@@ -104,7 +104,8 @@ preprocess_substitutions() {
104104fn_wallbash () {
105105 local template=" ${1} "
106106 local temp_target_file exec_command
107- WALLBASH_SCRIPTS=" ${template%% hyde/ wallbash* } hyde/wallbash/scripts"
107+ WALLBASH_SCRIPTS=" ${template%%/ wallbash/* } /wallbash/scripts"
108+
108109 if [[ " ${template} " == * .theme ]]; then
109110 # This is approach is to handle the theme files
110111 # We don't want themes to launch the exec_command or any arbitrary codes
@@ -117,11 +118,12 @@ fn_wallbash() {
117118 if [[ -n " ${dcolTemplate} " ]]; then
118119 eval target_file=" $( head -1 " ${dcolTemplate} " | awk -F ' |' ' {print $1}' ) "
119120 exec_command=" $( head -1 " ${dcolTemplate} " | awk -F ' |' ' {print $2}' ) "
120- WALLBASH_SCRIPTS=" ${dcolTemplate%% hyde/ wallbash* } hyde/wallbash/scripts"
121-
121+ WALLBASH_SCRIPTS=" ${dcolTemplate%%/ wallbash/* } /wallbash/scripts"
122122 fi
123123 fi
124124
125+ [[ " ${LOG_LEVEL} " == " debug" ]] && print_log -sec " wallbash" -stat " Template:" " ${template} "
126+
125127 # shellcheck disable=SC1091
126128 # shellcheck disable=SC2154
127129 [ -f " $HYDE_STATE_HOME /state" ] && source " $HYDE_STATE_HOME /state"
@@ -160,9 +162,12 @@ fn_wallbash() {
160162 mv " ${temp_target_file} " " ${target_file} "
161163 fi
162164 [ -z " ${exec_command} " ] || {
165+ [[ " ${LOG_LEVEL} " == " debug" ]] && print_log -sec " wallbash" -stat " Exec command:" " ${exec_command} from ${WALLBASH_SCRIPTS} "
163166 bash -c " ${exec_command} " &
164167 disown
165168 }
169+
170+ unset WALLBASH_SCRIPTS
166171}
167172
168173scrDir=" $( dirname " $( realpath " $0 " ) " ) "
0 commit comments