| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function help_getOptions { |
| |
| |
| local ARGSS="" |
| |
| |
| local ARGSL="quiet,answer-yes,dont-commit-changes,read,search:,edit,update,copy,delete,rename,backend:" |
| |
| |
| cli_parseArguments |
| |
| |
| |
| eval set -- "$ARGUMENTS" |
| |
| |
| |
| |
| if [[ $# -le 1 ]];then |
| /usr/bin/info --node="Top" --file=${MANUAL_BASEFILE}.info.bz2 |
| exit |
| fi |
| |
| |
| while true; do |
| case "$1" in |
| |
| --quiet ) |
| FLAG_QUIET="true" |
| FLAG_DONT_COMMIT_CHANGES="true" |
| shift 1 |
| ;; |
| |
| --answer-yes ) |
| FLAG_ANSWER="true" |
| shift 1 |
| ;; |
| |
| --dont-commit-changes ) |
| FLAG_DONT_COMMIT_CHANGES="true" |
| shift 1 |
| ;; |
| |
| --search ) |
| ACTIONNAM="searchIndex" |
| FLAG_SEARCH="$2" |
| shift 2 |
| ;; |
| |
| --edit ) |
| ACTIONNAM="editEntry" |
| shift 1 |
| ;; |
| |
| --copy ) |
| ACTIONNAM="copyEntry" |
| shift 1 |
| ;; |
| |
| --delete ) |
| ACTIONNAM="deleteEntry" |
| shift 1 |
| ;; |
| |
| --rename ) |
| ACTIONNAM="renameEntry" |
| shift 1 |
| ;; |
| |
| --update ) |
| ACTIONNAM="updateOutputFiles" |
| shift 1 |
| ;; |
| |
| --read ) |
| ACTIONNAM="searchNode" |
| FLAG_DONT_COMMIT_CHANGES='true' |
| shift 1 |
| ;; |
| |
| --backend ) |
| FLAG_BACKEND=$(cli_getRepoName ${2} -f) |
| shift 2 |
| ;; |
| |
| -- ) |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| shift 1 |
| break |
| ;; |
| esac |
| done |
| |
| |
| |
| FUNCDIRNAM="$(cli_getRepoName ${FUNCNAM} -d)/Backends/$(cli_getRepoName ${FLAG_BACKEND} -d)" |
| |
| |
| |
| |
| |
| |
| ACTIONNAM="${FLAG_BACKEND}_${ACTIONNAM}" |
| |
| |
| |
| |
| |
| if [[ ! -f ${FUNCDIR}/${FUNCDIRNAM}/${ACTIONNAM}.sh ]];then |
| cli_printMessage "`gettext "The action provided is not supported yet."`" --as-error-line |
| fi |
| |
| |
| cli_parseArgumentsReDef "$@" |
| |
| } |