diff --git a/isidore.sh b/isidore.sh index 9882f42..249cd7e 100755 --- a/isidore.sh +++ b/isidore.sh @@ -70,8 +70,13 @@ function set_config_vars() source $ISIDORE_CONFIG_DIR/config } +function print_usage() +{ + echo "USAGE: $1 [options]" +} + ## -# Create a new project +# Create a new project. # # Params: # $1 - The project directory @@ -84,10 +89,31 @@ function new_project() mkdir $NEW_PROJECT_DIR mkdir -p $NEW_PROJECT_DIR/site/ mkdir -p $NEW_PROJECT_DIR/templates/ - echo "" >> $NEW_PROJECT_DIR/config.php + echo \ +"" >> $NEW_PROJECT_DIR/config.php +} + +## +# Clean a project's build. +## +function clean_project() +{ + # TODO: Ensure that this is within an Isidore project. + rm -r output/ + echo "Project cleaned." } set_config_vars + +case $1 in + new) + new_project $2 $3;; + clean) + clean_project;; + *) + echo "Unknown command $1. Use the 'help' command." + print_usage $0;; +esac