| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function cli { |
| |
| |
| local FUNCNAM='' |
| local FUNCDIR='' |
| local FUNCDIRNAM='' |
| local FUNCSCRIPT='' |
| local ARGUMENTS='' |
| |
| |
| |
| |
| |
| local FLAG_FILTER='.+' |
| |
| |
| |
| |
| local FLAG_QUIET='false' |
| |
| |
| |
| |
| |
| local FLAG_ANSWER='false' |
| |
| |
| |
| |
| |
| local FLAG_DONT_COMMIT_CHANGES='false' |
| |
| |
| cli_parseArgumentsReDef "$@" |
| |
| |
| |
| 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}" --execution |
| |
| |
| |
| |
| shift 1 |
| |
| |
| cli_parseArgumentsReDef "$@" |
| |
| |
| if [[ ! "$EDITOR" =~ '/usr/bin/(vim|emacs|nano)' ]];then |
| EDITOR='/usr/bin/vim' |
| fi |
| |
| |
| cli_checkFiles $EDITOR --execution |
| |
| |
| |
| cli_exportFunctions "${FUNCDIR}/${FUNCDIRNAM}" |
| |
| |
| eval $FUNCNAM |
| |
| } |