diff --git a/lint.sh b/lint.sh index d1b9016..f1d93b8 100755 --- a/lint.sh +++ b/lint.sh @@ -8,3 +8,8 @@ trap 'echo Failed!' ERR echo 'Checking that all `flatpak` invocations pass `--system`.' # We use () to make this a subshell to avoid ! not triggering a `set -e` bailout; see bash(1)'s documentation on this flag for more ( ! grep -n flatpak *.sh | grep -v -- --system ) + +for i in bin/* sbin/*; do + echo 'Checking that `'"$i"'` contains `set -euo pipefail`.' + grep -q 'set -euo pipefail' $i +done diff --git a/sbin/seagl-reset-users b/sbin/seagl-reset-users index ab9547b..fc075d4 100755 --- a/sbin/seagl-reset-users +++ b/sbin/seagl-reset-users @@ -1,5 +1,7 @@ #!/bin/bash +set -euo pipefail + if ! [ $(id -u) == 0 ]; then echo must be run as root 1>&2 exit 1