commiting for reference new feature actually busted
This commit is contained in:
parent
035ae98ff8
commit
83cbe655c7
13
make.sh
13
make.sh
@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
rootDir='./site/'
|
||||
targetDir='post/'
|
||||
source .creds
|
||||
url="https://$user:$pass@neocities.org/api/upload"
|
||||
|
||||
post() {
|
||||
tmp=".swap"
|
||||
@ -22,6 +24,13 @@ post() {
|
||||
rm -f $full
|
||||
}
|
||||
|
||||
upload() {
|
||||
cd $rootDir
|
||||
name=''
|
||||
# first the root pages
|
||||
find -type f | xargs 'name=basename %';curl -f "$name=@%" $url
|
||||
}
|
||||
|
||||
_help() {
|
||||
echo 'Options:
|
||||
-p [postDirectory/*]
|
||||
@ -30,7 +39,7 @@ _help() {
|
||||
}
|
||||
mkdir -p "$rootDir/post"
|
||||
|
||||
while getopts ":srhp:" opt;do
|
||||
while getopts ":srhup:" opt;do
|
||||
case "$opt" in
|
||||
s)
|
||||
cp style.css "$rootDir" # root stylesheet
|
||||
@ -51,6 +60,8 @@ while getopts ":srhp:" opt;do
|
||||
post $file
|
||||
done
|
||||
;;
|
||||
u)
|
||||
upload;;
|
||||
h)
|
||||
_help;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user