From a8b7f0d0db2aa64efb6d176de321402d1f5e5bdb Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Wed, 25 Sep 2024 14:42:59 -0400 Subject: generate array of file time stamps for production --- build/stamp.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 build/stamp.sh (limited to 'build') diff --git a/build/stamp.sh b/build/stamp.sh new file mode 100755 index 0000000..3b19b04 --- /dev/null +++ b/build/stamp.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +out="./src/web/stamp.php" +public="./src/public" +files=$(find "$public" -type f -printf %P\\n) + +printf " "$out" +for file in $files; do + stamp=$(date +%s -r "$public/$file") + echo "\$__stamps['public/$file'] = $stamp;" >> "$out"; +done +echo "define('FILE_TIMES', \$__stamps);" >> "$out" +echo "unset(\$__stamps);" >> "$out" + -- cgit v1.2.3-freya