skriptit/snooze-skriptit/libexec/snooze-run-parts
Juhani Krekelä c0244cdd21 snooze-skriptit
2026-08-29 23:49:08 +03:00

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?}"