2023-05-25 18:13:18 +00:00
|
|
|
#!/usr/bin/bash
|
|
|
|
|
2023-05-25 19:00:38 +00:00
|
|
|
# todo: Create local cache containing file timestamps that were previously uploaded.
|
|
|
|
|
|
|
|
for cur in ./html/{*,*/*,*/*/*}; do
|
2023-05-25 18:13:18 +00:00
|
|
|
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
|