| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function help_getOptions { |
| |
| |
| local ARGSS="h,q" |
| |
| |
| local ARGSL="help,quiet,answer-yes,read,search:,format:,edit,update-output,update-structure,copy,delete,rename,sync-changes" |
| |
| |
| cli_parseArguments |
| |
| |
| |
| eval set -- "$ARGUMENTS" |
| |
| |
| while true; do |
| case "$1" in |
| |
| -h | --help ) |
| cli_runFnEnvironment help --read --format="texinfo" trunk/Scripts/Bash/Functions/Help |
| shift 1 |
| exit |
| ;; |
| |
| -q | --quiet ) |
| FLAG_QUIET="true" |
| shift 1 |
| ;; |
| |
| --answer-yes ) |
| FLAG_ANSWER="true" |
| shift 1 |
| ;; |
| |
| --sync-changes ) |
| FLAG_SYNC_CHANGES="true" |
| shift 1 |
| ;; |
| |
| --search ) |
| ACTIONNAM="searchIndex" |
| FLAG_SEARCH="$2" |
| shift 2 |
| ;; |
| |
| --format ) |
| FLAG_FORMAT=$(cli_getRepoName "$2" -f) |
| |
| |
| |
| if [[ ! $FLAG_FORMAT =~ '^(texinfo)$' ]];then |
| cli_printMessage "`gettext "The documentation format provided is not supported."`" --as-error-line |
| fi |
| shift 2 |
| ;; |
| |
| --read ) |
| ACTIONNAM="searchNode" |
| shift 1 |
| ;; |
| |
| --edit ) |
| ACTIONNAM="editEntry" |
| shift 1 |
| ;; |
| |
| --copy ) |
| ACTIONNAM="copyEntry" |
| shift 1 |
| ;; |
| |
| --delete ) |
| ACTIONNAM="deleteEntry" |
| shift 1 |
| ;; |
| |
| --rename ) |
| ACTIONNAM="renameEntry" |
| shift 1 |
| ;; |
| |
| --update-output ) |
| ACTIONNAM="updateOutputFiles" |
| shift 1 |
| ;; |
| |
| --update-structure ) |
| ACTIONNAM="updateStructureSection" |
| shift 1 |
| ;; |
| |
| -- ) |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| shift 1 |
| break |
| ;; |
| esac |
| done |
| |
| |
| cli_parseArgumentsReDef "$@" |
| |
| } |