Skip to content

Commit 7eda316

Browse files
committed
globing
1 parent 6387e8b commit 7eda316

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Scripts/Manage-Config

+4-3
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ generate_config_list() { #* Check the content of a Directory and make a restore
100100
# restore_directory is the Source directory for Configs
101101
restore_directory="${1:-${CloneDir}/Configs}"
102102
# echo "$restore_directory"
103+
# shellcheck disable=SC2154
103104
: >"${ctl_override}"
104105
# Read the file line by line
105106
while IFS= read -r line; do
@@ -134,7 +135,7 @@ generate_config_list() { #* Check the content of a Directory and make a restore
134135
;;
135136
esac
136137
done
137-
done <"$(dirname ${restore_directory})/Scripts/restore_cfg.lst"
138+
done <"$(dirname "${restore_directory}")/Scripts/restore_cfg.lst"
138139
}
139140

140141
# shellcheck disable=SC2120
@@ -145,14 +146,14 @@ generate_config_list() { #* Check the content of a Directory and make a restore
145146
make_List() {
146147
# enable_package md5sum
147148
CloneDir=${1:-"${CloneDir}"}
148-
[ ! -d ${CloneDir} ] && exit 0
149+
[ ! -d "${CloneDir}" ] && exit 0
149150

150151
#? If the ctlFile is present and no reuse flag do this
151152
if [ -e "${ctlFile}" ] && [[ $* != *"--reuse"* ]]; then
152153
show_restore_list "${ctlFile}"
153154
now_restore_cfg_hash="$(md5sum "${CloneDir}/Scripts/restore_cfg.lst" | cut -d' ' -f1)"
154155

155-
if [ "$now_restore_cfg_hash" != "$restore_cfg_hash" ]; then
156+
if [ "$now_restore_cfg_hash" != "${restore_cfg_hash}" ]; then
156157
generate_config_list "${CloneDir}/Configs"
157158
print_prompt -g "\n\n\nNew Files has been added/removed!" "\nCreate a new control file to avoid conflicts!\n"
158159
else

0 commit comments

Comments
 (0)