uploading script with skip of persistent files

This commit is contained in:
veclav talica 2023-05-25 23:13:18 +05:00
parent 1e37fcebd2
commit ca7597ee8f

15
upload.sh Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/bash
for cur in ./html/{*,**/*}; do
if [[ "$cur" == *"/tracks/"* ]]; then
continue
fi
if [ -f "$cur" ]; then
d=$(dirname $(realpath --relative-to="./html" "$cur"))
if [[ "$d" == "." ]]; then
neocities upload $cur
else
neocities upload -d $(dirname $(realpath --relative-to="./html" "$cur")) $cur
fi
fi
done