help prompt is now helpful and we've added server functionality via python
This commit is contained in:
parent
78e430b4ca
commit
29aa8a72bb
19
make
19
make
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user