| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function cli { |
| |
| |
| local FUNCNAM='' |
| local FUNCDIR='' |
| local FUNCDIRNAM='' |
| local FUNCSCRIPT='' |
| local FUNCCONFIG='' |
| local ARGUMENTS='' |
| |
| |
| |
| |
| |
| local FLAG_FILTER='.+' |
| |
| |
| |
| |
| local FLAG_QUIET='false' |
| |
| |
| |
| |
| |
| local FLAG_ANSWER='false' |
| |
| |
| |
| |
| |
| local FLAG_DONT_COMMIT_CHANGES='false' |
| |
| |
| cli_doParseArgumentsReDef "$@" |
| |
| |
| |
| FUNCDIR=${CLI_BASEDIR}/Functions |
| |
| |
| |
| |
| |
| if [[ "$1" == '' ]];then |
| exec ${CLI_BASEDIR}/centos-art.sh help |
| exit |
| fi |
| |
| |
| |
| |
| FUNCNAM=$(cli_getRepoName "$1" 'f') |
| |
| |
| FUNCDIRNAM=$(cli_getRepoName "$FUNCNAM" 'd') |
| |
| |
| FUNCSCRIPT=${FUNCDIR}/${FUNCDIRNAM}/${FUNCNAM}.sh |
| |
| |
| cli_checkFiles $FUNCSCRIPT 'x' |
| |
| |
| |
| |
| FUNCCONFIG=${FUNCDIR}/${FUNCDIRNAM}/Config |
| |
| |
| |
| |
| shift 1 |
| |
| |
| cli_doParseArgumentsReDef "$@" |
| |
| |
| if [[ ! "$EDITOR" =~ '/usr/bin/(vim|emacs|nano)' ]];then |
| EDITOR='/usr/bin/vim' |
| fi |
| |
| |
| cli_checkFiles $EDITOR 'x' |
| |
| |
| |
| cli_getFunctions |
| |
| } |