diff --git a/upload.sh b/upload.sh new file mode 100755 index 0000000..58d5028 --- /dev/null +++ b/upload.sh @@ -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