diff --git a/make b/make index 6d7f6e7..566676d 100755 --- a/make +++ b/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