Moved to slp format, also removed sysvinit dependency (unsure why it was there)

This commit is contained in:
2020-08-23 08:20:52 -05:00
parent b9d20d9c88
commit 92980232a6
5 changed files with 7 additions and 7 deletions

39
SL/runall Executable file
View File

@@ -0,0 +1,39 @@
#!/bin/sh
usage () {
echo "Usage: ${0#*/} [DIRECTORY]..."
echo "Run all executable scripts in one or more directories"
exit $1
}
ERRORS=
if [ -z "$1" ]; then
usage 2
fi
for dir in "$@"; do
dir=${dir%/}
if [ ! -d "$dir" ]; then
echo "$dir: invalid directory"
usage 2
fi
for file in "$dir"/*; do
if [ -x "$file" ]; then
"$file"
if [ "$?" -gt 0 ]; then
ERRORS="$ERRORS $file"
fi
fi
done
done
if [ -n "$ERRORS" ]; then
echo "There were errors in the following scripts:$ERRORS"
exit 1
fi