16 lines
290 B
Shell
Executable file
16 lines
290 B
Shell
Executable file
#!/bin/sh
|
|
set -e
|
|
|
|
timefile="${1?}"
|
|
parts_dir="${2?}"
|
|
|
|
printf '%s %s\n' "$(date '+%Y-%m-%d %H:%M:%S %z')" "$parts_dir"
|
|
for part in "${parts_dir?}"/*
|
|
do
|
|
if [ -x "$part" ] && ! [ -d "$part" ]
|
|
then
|
|
"$part" || printf 'snooze-run-parts: failed: %s' "$part" >&2
|
|
fi
|
|
done
|
|
|
|
touch "${timefile?}"
|