diff --git a/init b/init index 25422c7..6f70242 100755 --- a/init +++ b/init @@ -2,18 +2,24 @@ SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" NEEDS="needs to be installed through your distro's package manager" -if ! whereis python3 | grep "/"; then +failed=false + +if ! whereis python3 | grep "/" &> /dev/null; then echo "python3" $NEEDS - exit 1 + failed=true fi -if ! whereis pip3 | grep "/"; then +if ! whereis pip3 | grep "/" &> /dev/null; then echo "pip3" $NEEDS - exit 1 + failed=true fi -if ! whereis pdflatex | grep "/"; then +if ! whereis pdflatex | grep "/" &> /dev/null; then echo "texlive" $NEEDS + failed=true +fi + +if $failed; then exit 1 fi