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() {
|
_help() {
|
||||||
echo 'Options:
|
echo 'Options:
|
||||||
-p [postDirectory/*]
|
-h show this prompt
|
||||||
-r (build root pages)
|
-p [postDirectory/*] (takes a list of paths to build from)
|
||||||
-s (copy stylesheets)'
|
-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"
|
mkdir -p "$rootDir/post"
|
||||||
|
|
||||||
if [ -z $1 ]
|
if [ -z $1 ]
|
||||||
@ -45,7 +54,7 @@ then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while getopts ":srhup:" opt;do
|
while getopts ":slrhup:" opt;do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
s)
|
s)
|
||||||
cp style.css "$rootDir" # root stylesheet
|
cp style.css "$rootDir" # root stylesheet
|
||||||
@ -70,5 +79,7 @@ while getopts ":srhup:" opt;do
|
|||||||
upload;; # this needs a proper fix according to api
|
upload;; # this needs a proper fix according to api
|
||||||
h)
|
h)
|
||||||
_help;;
|
_help;;
|
||||||
|
l)
|
||||||
|
server;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user