From ca7597ee8f316583c9e4914695ad15b496bfa5ff Mon Sep 17 00:00:00 2001 From: veclav talica Date: Thu, 25 May 2023 23:13:18 +0500 Subject: [PATCH] uploading script with skip of persistent files --- upload.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 upload.sh 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