diff --git a/kfg b/kfg index b0b1d53..9454740 100644 --- a/kfg +++ b/kfg @@ -1,7 +1,7 @@ #!/bin/bash NAME="kfg" -VERSION="0.3" +VERSION="0.2" HOME_PATH="$HOME" TMP_PATH="$HOME_PATH/tmp/kamu_install" @@ -41,13 +41,8 @@ function show_help_opt { echo -en "opt := { ${INFO}-h${ENDCOLOR} | ${INFO}--help${ENDCOLOR} \t\t Show this help, ${INFO}-y${ENDCOLOR} | ${INFO}--yes${ENDCOLOR} \t\t Skip confirmation questions, - ${INFO}-m${ENDCOLOR} | ${INFO}--arch STRING${ENDCOLOR} \t Set the architecture string to be used when downloading files from repositories. Most common are "amd64", "arm64", "armhf", etc, + ${INFO}-a${ENDCOLOR} | ${INFO}--arch STRING${ENDCOLOR} \t Set the architecture string to be used when downloading files from repositories. Most common are "amd64", "arm64", "armhf", etc, ${INFO}-d${ENDCOLOR} | ${INFO}--debug${ENDCOLOR}\t\t Print debug output, - ${INFO}-c${ENDCOLOR} \t\t\t Install config files, - ${INFO}-r${ENDCOLOR} \t\t\t Add configs into the RC file, - ${INFO}-b${ENDCOLOR} \t\t\t Install binaries depending on the ARCH, - ${INFO}-z${ENDCOLOR} \t\t\t Set shell to zsh, - ${INFO}-a${ENDCOLOR} \t\t\t Just install everything }\n" } @@ -432,6 +427,7 @@ function install { while : do case "$1" in + help) show_help_install; exit 0 ;; "") break ;; all) p_all; shift ;; zsh) p_zsh; shift ;; @@ -455,7 +451,7 @@ if [ -z $1 ]; then show_help fi -PARSED_ARGUMENTS=$(getopt -a -n install.sh -o hvyi:acrbm:p --long yes,help,debug,arch: -- "$@") +PARSED_ARGUMENTS=$(getopt -a -n install.sh -o hvdya: --long yes,help,debug,arch,verbose: -- "$@") VALID_ARGUMENTS=$? if [ "$VALID_ARGUMENTS" != "0" ]; then show_help @@ -469,16 +465,10 @@ while : do case "$1" in -h | --help) show_help ;; - -v) P_Verbose=1 ; shift ;; + -v | --verbose) P_Verbose=1 ; shift ;; -d | --debug) P_Debug=1 ; shift ;; -y | --yes) P_Yes=1 ; shift ;; - -p) P_APT=1; P_DEB=1 ; shift ;; - -c) P_CONFIG=1 ; shift ;; - -r) P_RC=1 ; shift ;; - -b) P_BINARY=1 ; shift ;; - -m | --arch) ARCH="$2" ; shift 2 ;; - -z) P_ZSH=1 ; shift ;; - -a) P_APT=1; P_DEB=1; P_CONFIG=1; P_RC=1; P_BINARY=1; P_ZSH=1; shift ;; + -a | --arch) ARCH="$2" ; shift 2 ;; # -- means the end of the arguments; drop this, and break out of the while loop --) shift; break ;; # If invalid options were passed, then getopt should have reported an error,