commit f4fcaa9bb3bed11a760e4b1f0223981a07085568
parent b113a6f2a693a3b97fa69488b4493a32da24e9c0
Author: finwo <finwo@pm.me>
Date: Mon, 12 Jan 2026 21:53:25 +0100
Mac-compatible template util
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tool/template.sh b/tool/template.sh
@@ -6,6 +6,8 @@
# Replaces all {{VAR}} by the $VAR value in a template file and outputs it
+FIND=$(command -v gfind find | head -1)
+
readonly PROGNAME=$(basename $0)
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
@@ -59,7 +61,7 @@ while [ "$#" -gt 0 ]; do
if [[ -d "${1}" ]]; then
while IFS=':' read name filename; do
PARTIALS["$name"]="${filename}"
- done <<< "$(find "${1}" -type f -printf "%P:%p\n")"
+ done <<< "$(${FIND} "${1}" -type f -printf "%P:%p\n")"
fi
;;
*)