publish.sh (385B)
1 #!/bin/bash 2 3 gio trash dist 4 ./build.sh 5 #tar -C dist -cvz . > site.tar.gz 6 #hut pages publish -d tomhonour.srht.site site.tar.gz 7 8 cd dist 9 find . -type f | while read -r file; do 10 # Remove the leading "./" for the remote path 11 remote_path="${file#./}" 12 13 echo "Uploading $remote_path..." 14 curl -u "tomhonour:password" -F "$remote_path=@$file" "https://neocities.org/api/upload" 15 done 16 cd ..