xrsh-com/com/isoterminal/mnt/hook
Leon van Kammen 7bfa591536
All checks were successful
/ test (push) Successful in 4s
various unix utilities to interface with browser
2024-08-27 18:40:05 +00:00

15 lines
278 B
Bash
Executable file

#!/bin/sh
test -z $1 && { echo "usage: hook <cmd_or_jsfunction> [args]"; exit 0; }
cmd=$1
shift
test -d ~/hook.d/$cmd && {
chmod +x ~/hook.d/$cmd/*
find ~/hook.d/$cmd/ -type f -executable | while read hook; do
$hook "$@" || true
done
}
#test $BROWSER = 1 && {