Add exit code

This commit is contained in:
Fierelier 2024-02-16 05:13:13 +01:00
parent fced11b21d
commit 6c6d1ee43c
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash
exit_code=0
prereqs=(
"bash"
"flock"
@ -17,5 +18,7 @@ for prereq in "${prereqs[@]}"; do
echo -n "$prereq: "
if ! command -v "$prereq"; then
echo "NOT FOUND."
exit_code=1
fi
done
done
exit $exit_code