Use find instead of ls
The listing of *-$INSTALL_TYPE-install files currently uses ls, which errors out when the glob matches no files, thus using true to not fail it. Instead, use find to collect the file list, so there is no need to ignore the command errors. Change-Id: Ic6888106858df320a1c90a84f1b9ec74d436b9e6
This commit is contained in:
parent
4fbad49972
commit
516e3ae7d6
@ -50,7 +50,7 @@ done
|
|||||||
# For any existing *-<default_install_dir>-install directory under install.d,
|
# For any existing *-<default_install_dir>-install directory under install.d,
|
||||||
# if an environment variable setting a different install type was not seen,
|
# if an environment variable setting a different install type was not seen,
|
||||||
# enable the default (set via --install-type).
|
# enable the default (set via --install-type).
|
||||||
default_install_type_dirs=$(ls -d $TMP_HOOKS_PATH/install.d/*-${DIB_DEFAULT_INSTALLTYPE}-install || true)
|
default_install_type_dirs=$(find $TMP_HOOKS_PATH/install.d -maxdepth 1 -name "*-${DIB_DEFAULT_INSTALLTYPE}-install" -type d)
|
||||||
for _install_dir in $default_install_type_dirs; do
|
for _install_dir in $default_install_type_dirs; do
|
||||||
SUFFIX="-${DIB_DEFAULT_INSTALLTYPE}-install"
|
SUFFIX="-${DIB_DEFAULT_INSTALLTYPE}-install"
|
||||||
_install_dir=$(basename $_install_dir)
|
_install_dir=$(basename $_install_dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user