help prompt is now helpful and we've added server functionality via python

This commit is contained in:
shockrah 2019-09-13 20:16:48 -07:00
parent 78e430b4ca
commit 29aa8a72bb

19
make
View File

@ -33,10 +33,19 @@ upload() {
_help() {
echo 'Options:
-p [postDirectory/*]
-r (build root pages)
-s (copy stylesheets)'
-h show this prompt
-p [postDirectory/*] (takes a list of paths to build from)
-r build root pages
-s copy stylesheets
-l run live server'
}
server() {
cd $rootDir
echo 'Address: 0.0.0.0:8080'
python -m SimpleHTTPServer 8080
}
mkdir -p "$rootDir/post"
if [ -z $1 ]
@ -45,7 +54,7 @@ then
exit 0
fi
while getopts ":srhup:" opt;do
while getopts ":slrhup:" opt;do
case "$opt" in
s)
cp style.css "$rootDir" # root stylesheet
@ -70,5 +79,7 @@ while getopts ":srhup:" opt;do
upload;; # this needs a proper fix according to api
h)
_help;;
l)
server;;
esac
done