| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function identity_getActions { |
| |
| |
| local ARGSS="" |
| |
| |
| local ARGSL="render:,release:,architecture:,copy:,to:" |
| |
| |
| cli_doParseArguments |
| |
| |
| |
| eval set -- "$ARGUMENTS" |
| |
| |
| while true; do |
| |
| case "$1" in |
| |
| --render ) |
| |
| |
| ACTIONNAM="${FUNCNAM}_render" |
| |
| |
| ACTIONVAL="$2" |
| |
| |
| shift 2 |
| ;; |
| |
| --copy ) |
| |
| |
| ACTIONVAL="$2" |
| |
| |
| ACTIONNAM="${FUNCNAME}_doCopy" |
| |
| |
| shift 2 |
| ;; |
| |
| --release ) |
| |
| |
| FLAG_RELEASE="$2" |
| |
| |
| if [[ ! $FLAG_RELEASE =~ $(cli_getPathComponent '--release-pattern') ]];then |
| cli_printMessage "`gettext "The release number provided is not supported."`" 'AsErrorLine' |
| cli_printMessage "$(caller)" 'AsToKnowMoreLine' |
| fi |
| |
| |
| shift 2 |
| ;; |
| |
| --architecture ) |
| |
| |
| FLAG_ARCHITECTURE="$2" |
| |
| |
| if [[ ! $FLAG_ARCHITECTURE =~ $(cli_getPathComponent '--architecture-pattern') ]];then |
| cli_printMessage "`gettext "The architecture provided is not supported."`" 'AsErrorLine' |
| cli_printMessage "$(caller)" 'AsToKnowMoreLine' |
| fi |
| |
| |
| shift 2 |
| ;; |
| |
| --to ) |
| |
| |
| FLAG_TO="$2" |
| |
| |
| shift 2 |
| ;; |
| |
| * ) |
| |
| break |
| esac |
| done |
| |
| |
| |
| |
| cli_checkRepoDirSource |
| |
| |
| |
| |
| |
| local ARTCONF=$(echo "$ACTIONVAL" \ |
| | sed -r -e 's!/(Identity)!/Scripts/Bash/Functions/Identity/Config/\1!' \ |
| -e "s!Motifs/$(cli_getPathComponent '--theme')/?!!") |
| |
| |
| cli_checkFiles "$ARTCONF" 'd' |
| |
| |
| |
| cli_commitRepoChanges |
| |
| |
| 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 |
| |
| } |