On Mon, Aug 21, 2023, 08:15 Duncan, <1i5t5.dun...@cox.net> wrote: > Suggestion: A more flexible approach would make pre/post directories, >
Or allow both file and directories. > do [[ > # maybe skip either the executable or README test? > # or perhaps only match *.sh filenames instead > # to reflect the in-shell sourcing? > -x $hookfile && > $hookfile == ${hookfile#README} && > $hookfile == ${hookfile#.} && > $hookfile == ${hookfile%.bak} && > $hookfile == ${hookfile%\~} > ]] && source "$hookfile" > done > Just checking if file has +x is better. Easier to disable scripts that way.