14 lines
365 B
Bash
Executable file
14 lines
365 B
Bash
Executable file
#!/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"
|
|
|