diff options
author | Yehonal <yehonal.azeroth@gmail.com> | 2017-10-12 20:00:52 +0200 |
---|---|---|
committer | Yehonal <yehonal.azeroth@gmail.com> | 2017-10-12 20:00:52 +0200 |
commit | f06f32849f1e2c72dc73287c73361174c07ed29e (patch) | |
tree | 70ace68e849cd5ca446fb36279f8125127bb8693 /apps/installer/main.sh | |
parent | 4df28fd29c6978e669f9950bd38e853fabf9fc8d (diff) |
Directory Structure [step 1]: moving files
working on #672
NOTE: This commit can't be compiled!!
Diffstat (limited to 'apps/installer/main.sh')
-rw-r--r-- | apps/installer/main.sh | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/apps/installer/main.sh b/apps/installer/main.sh new file mode 100644 index 0000000000..a71bca1996 --- /dev/null +++ b/apps/installer/main.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash + +CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +source "$CURRENT_PATH/includes/includes.sh" + +cmdopt=$1 + +while true +do +echo "===== INSTALLER SCRIPT =====" +PS3='Please enter your choice: ' +options=( + "First Installation" "Configure OS dep" "Update Repository" "Reset & Clean Repository" + "Compile" "Clean & Compile" "Assemble & Import DB" "Module Search" "Module Install" "Module Update" "Module Remove" + "Sub Menu >> Compiler" "Sub Menu >> DB Assembler" + "Quit" + ) + +function _switch() { + case $1 in + "First Installation") + inst_allInOne + ;; + "Configure OS dep") + inst_configureOS + ;; + "Update Repository") + inst_updateRepo + ;; + "Reset & Clean Repository") + inst_resetRepo + ;; + "Compile") + inst_compile + ;; + "Clean & Compile") + inst_cleanCompile + ;; + "Assemble & Import DB") + inst_assembleDb + ;; + "Module Search") + inst_module_search $2 + ;; + "Module Install") + inst_module_install $2 + ;; + "Module Update") + inst_module_update $2 + ;; + "Module Remove") + inst_module_remove $2 + ;; + "Sub Menu >> Compiler") + bash "$AC_PATH_BIN/compiler/compiler.sh" + ;; + "Sub Menu >> DB Assembler") + bash "$AC_PATH_BIN/db_assembler/db_assembler.sh" + ;; + "Quit") + echo "Goodbye!" + exit + ;; + *) echo invalid option;; + esac +} + +# run option directly if specified in argument +[ ! -z $1 ] && _switch "${options[$cmdopt-1]}" && exit 0 + +select opt in "${options[@]}" +do + _switch "$opt" + break +done +done |