From b5ec083e70bb00e436eb2453f2082b3deeb56f0a Mon Sep 17 00:00:00 2001 From: TomMajor Date: Tue, 28 Jul 2020 19:47:04 +0200 Subject: [PATCH] Copy only xml files from customized firmware dir --- src/rc.d/jp-hb-devices-addon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rc.d/jp-hb-devices-addon b/src/rc.d/jp-hb-devices-addon index 16bd96e9..15d8e6b0 100755 --- a/src/rc.d/jp-hb-devices-addon +++ b/src/rc.d/jp-hb-devices-addon @@ -152,9 +152,9 @@ case "$1" in echo "Running scripts..." | tee -a $GLOBAL_LOGFILE for f in ${ADDON_DIR}/install_* ; do echo " - $(basename $f)"; ./$(basename $f) >> $GLOBAL_LOGFILE 2>>$GLOBAL_ERRFILE; done - if [ "$(ls -A $CUSTOMIZED_FIRMWARE_DIR)" ]; then + if [ "$(find ${CUSTOMIZED_FIRMWARE_DIR} -type f -iname '*.xml')" ]; then echo "Copying customized firmware files..." | tee -a $GLOBAL_LOGFILE - cp ${CUSTOMIZED_FIRMWARE_DIR}/* ${ADDON_DIR}${FIRMWARE_DIR}/ + cp ${CUSTOMIZED_FIRMWARE_DIR}/*.xml ${ADDON_DIR}${FIRMWARE_DIR}/ else echo "No customized firmware files found in ${CUSTOMIZED_FIRMWARE_DIR}." | tee -a $GLOBAL_LOGFILE fi