upload.sh: --fresh flag

This commit is contained in:
veclav talica 2024-07-28 04:06:19 +03:00
parent d1fe7a9230
commit aa2f7a45b8

View File

@ -2,6 +2,14 @@
set +e set +e
for arg in "$*"
do
case "$arg" in
"--fresh") find ./html/ -type f -name '*.upload-checksum' -delete
;;
esac
done
for cur in ./html/{*,*/*,*/*/*}; do for cur in ./html/{*,*/*,*/*/*}; do
if [ -f "$cur" ] && [[ ! "$cur" == *.upload-checksum ]]; then if [ -f "$cur" ] && [[ ! "$cur" == *.upload-checksum ]]; then
if [ -f "$cur.upload-checksum" ]; then if [ -f "$cur.upload-checksum" ]; then