get rid of tree dependency / check if command exists

This commit is contained in:
Maximilian Keßler 2022-02-16 11:12:31 +01:00
parent 9c43ced39a
commit f2dfab5a45

View file

@ -5,4 +5,9 @@ mkdir public
mv build/$mainfile.pdf public mv build/$mainfile.pdf public
mv build/$mainfile.log public mv build/$mainfile.log public
cd public/ cd public/
if ! command -v tree &> /dev/null
then
echo "No tree utility found, skipping making tree"
else
tree -H '.' -I "index.html" -D --charset utf-8 -T "$course" > index.html tree -H '.' -I "index.html" -D --charset utf-8 -T "$course" > index.html
fi