| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function render_doThemeActions { |
| |
| local -a DIRS |
| local COUNT=0 |
| local NEXT_DIR='' |
| local MOTIF_NAME='' |
| local MOTIF_DIR='' |
| |
| |
| |
| local MOTIF_BASEDIR="$(cli_getRepoTLDir $ACTIONVAL)/Identity/Images/Themes" |
| |
| |
| |
| local MODEL_BASEDIR="$(cli_getRepoTLDir $ACTIONVAL)/Identity/Models/Themes" |
| |
| |
| |
| |
| |
| |
| |
| local MODEL_DIR='' |
| local MODEL_DIRS="$(cli_getFilesList ${MODEL_BASEDIR}/${FLAG_THEME_MODEL} \ |
| --pattern=".+" --type="d" | egrep -v '\.svn' | sed -r '/^[[:space:]]*$/d' | sed -r \ |
| "s!^.*/${FLAG_THEME_MODEL}/!!" | sed -r '/^[[:space:]]*$/d')" |
| |
| |
| |
| local MODEL_PATTERN=$(echo "$MODEL_DIRS" | tr "\n" '|' \ |
| | sed -e 's!^|!!' -e 's!|$!!') |
| |
| |
| |
| |
| |
| |
| |
| local MOTIF_RENDERABLE_DIR='' |
| local MOTIF_RENDERABLE_DIRS=$(cli_getFilesList ${MOTIF_BASEDIR} \ |
| --pattern=".+/($MODEL_PATTERN)" --type="d" | grep "$ACTIONVAL") |
| |
| |
| |
| |
| for MOTIF_RENDERABLE_DIR in $MOTIF_RENDERABLE_DIRS;do |
| DIRS[((++${#DIRS[*]}))]=${MOTIF_RENDERABLE_DIR} |
| done |
| |
| |
| |
| |
| local DIRS_TOTAL=$((${#DIRS[*]} - 1)) |
| |
| while [[ $COUNT -le ${DIRS_TOTAL} ]];do |
| |
| |
| |
| ACTIONVAL=${DIRS[$COUNT]} |
| |
| |
| MOTIF_NAME=$(cli_getPathComponent $ACTIONVAL --motif) |
| |
| |
| |
| |
| |
| |
| |
| |
| if [[ $MOTIF_NAME == '' ]] || [[ $MOTIF_NAME =~ "^$MODEL_PATTERN" ]];then |
| COUNT=$(($COUNT + 1)) |
| continue |
| fi |
| |
| |
| |
| |
| |
| MOTIF_DIR="${MOTIF_BASEDIR}/${MOTIF_NAME}" |
| |
| |
| |
| |
| if [[ $COUNT -lt ${DIRS_TOTAL} ]];then |
| NEXT_DIR=$(dirname ${DIRS[(($COUNT + 1))]}) |
| else |
| NEXT_DIR='' |
| fi |
| |
| |
| |
| |
| |
| |
| if [[ $ACTIONVAL =~ '[[:digit:]]$' ]] || [[ $ACTIONVAL == $NEXT_DIR ]];then |
| COUNT=$(($COUNT + 1)) |
| continue |
| fi |
| |
| |
| |
| render_doBaseActions |
| |
| |
| COUNT=$(($COUNT + 1)) |
| |
| done |
| |
| } |