fix_import

This commit is contained in:
Sven R
2020-02-25 12:48:52 +01:00
parent 73e97ab18f
commit 659517b595

View File

@@ -178,8 +178,8 @@ if [ ! -d "${bastille_backupsdir}" ]; then
fi
# Check if archive exist then trim archive name
if [ "$(ls "${bastille_backupsdir}" | awk "/^${TARGET}$/")" ]; then
TARGET_TRIM=$(echo ${TARGET} | sed "s/_[0-9]*-[0-9]*-[0-9]*-[0-9]*.[txz]\{2,3\}//")
if ls "${bastille_backupsdir}" | awk "/^${TARGET}$/"; then
TARGET_TRIM=$(echo "${TARGET}" | sed "s/_[0-9]*-[0-9]*-[0-9]*-[0-9]*.[txz]\{2,3\}//g;s/_[0-9]*-[0-9]*-[0-9]*.zip//g")
else
error_notify "${COLOR_RED}Archive '${TARGET}' not found.${COLOR_RESET}"
fi