| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function path_getActions { |
| |
| |
| local ARGSS="" |
| |
| |
| local ARGSL="copy:,move:,delete:,to:,sync" |
| |
| |
| cli_doParseArguments |
| |
| |
| |
| eval set -- "$ARGUMENTS" |
| |
| |
| while true; do |
| case "$1" in |
| |
| --copy ) |
| |
| |
| ACTIONVAL="$2" |
| |
| |
| ACTIONNAM="${FUNCNAM}_doCopy" |
| |
| |
| shift 2 |
| ;; |
| |
| --delete ) |
| |
| |
| ACTIONVAL="$2" |
| |
| |
| ACTIONNAM="${FUNCNAM}_doDelete" |
| |
| |
| shift 2 |
| ;; |
| |
| --to ) |
| |
| |
| FLAG_TO="$2" |
| |
| |
| cli_checkRepoDirTarget |
| |
| |
| shift 2 |
| ;; |
| |
| --sync ) |
| |
| |
| FLAG_SYNC='true' |
| |
| |
| shift 1 |
| ;; |
| |
| * ) |
| |
| break |
| esac |
| done |
| |
| |
| |
| cli_checkRepoDirSource |
| |
| |
| |
| cli_commitRepoChanges "${ACTIOVAL} ${FLAG_TO}" |
| |
| |
| if [[ $ACTIONNAM =~ "^${FUNCNAM}_[A-Za-z]+$" ]];then |
| eval $ACTIONNAM |
| else |
| cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine' |
| cli_printMessage "$(caller)" 'AsToKnowMoreLine' |
| fi |
| |
| |
| |
| cli_commitRepoChanges "${ACTIOVAL} ${FLAG_TO}" |
| |
| } |