Add "" around variables in test(1) cases to prevent errors when a variable is unset

This commit is contained in:
Lars Engels
2019-12-11 20:35:05 +01:00
parent 3f7573825d
commit 5b11f81a1b
5 changed files with 12 additions and 12 deletions

View File

@@ -56,7 +56,7 @@ verify_template() {
for _hook in TARGET INCLUDE PRE OVERLAY FSTAB PF PKG SYSRC SERVICE CMD; do
_path=${_template_path}/${_hook}
if [ -s ${_path} ]; then
if [ -s "${_path}" ]; then
_hook_validate=$((_hook_validate+1))
echo -e "${COLOR_GREEN}Detected ${_hook} hook.${COLOR_RESET}"