diff --git a/upload.sh b/upload.sh new file mode 100644 index 0000000..e2db8c4 --- /dev/null +++ b/upload.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +source ./.env + +url="https://neocities.org" +auth="Authorization: Bearer $KEY" +site=.mirror + +html() { + # Total reupload of the site's html + pushd $site > /dev/null + echo `pwd` + for f in $(find -name '*.html');do + remote_path=${f:1} + curl -H "$auth" -F "$remote_path=@$f" $url/api/upload + done + popd > /dev/null +} + +if [ -z $1 ];then +cat <