From 29aa8a72bbc49852d636eaf9fde523de1b4f9b26 Mon Sep 17 00:00:00 2001 From: shockrah Date: Fri, 13 Sep 2019 20:16:48 -0700 Subject: [PATCH] help prompt is now helpful and we've added server functionality via python --- make | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) 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