diff options
author | Freya Murphy <freya@freyacat.org> | 2024-09-25 14:42:59 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-09-25 14:42:59 -0400 |
commit | a8b7f0d0db2aa64efb6d176de321402d1f5e5bdb (patch) | |
tree | 723798498c591076092e825d4b5ddee825cf252b /build | |
parent | update website min width, fix pre elements expanding too far (diff) | |
download | website-a8b7f0d0db2aa64efb6d176de321402d1f5e5bdb.tar.gz website-a8b7f0d0db2aa64efb6d176de321402d1f5e5bdb.tar.bz2 website-a8b7f0d0db2aa64efb6d176de321402d1f5e5bdb.zip |
generate array of file time stamps for production
Diffstat (limited to 'build')
-rwxr-xr-x | build/stamp.sh | 14 |
1 files changed, 14 insertions, 0 deletions
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 "<?php\n\$__stamps = array();\n" > "$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" + |