Fix export cmd with predefined/default options

This commit is contained in:
JRGTH
2025-06-20 00:06:37 -04:00
parent 51689487b4
commit 8b278ede4e

View File

@@ -93,36 +93,43 @@ if [ -n "${bastille_export_options}" ]; then
info "Default export option(s): '${DEFAULT_EXPORT_OPTS}'"
# Don't shift here when default export options are explicitly denoted in the config file, hence TARGET will always be $1.
for opt in ${DEFAULT_EXPORT_OPTS}; do
case "${opt}" in
-a|--auto)
AUTO="1"
;;
--gz)
GZIP_EXPORT="1"
opt_count
shift;;
;;
--xz)
XZ_EXPORT="1"
opt_count
shift;;
;;
--tgz)
TGZ_EXPORT="1"
opt_count
zfs_enable_check
shift;;
;;
--txz)
TXZ_EXPORT="1"
opt_count
zfs_enable_check
shift;;
;;
-s|--safe)
SAFE_EXPORT="1"
shift;;
;;
-r|--raw)
RAW_EXPORT="1"
opt_count
shift ;;
;;
-v|--verbose)
OPT_ZSEND="-Rv"
shift;;
;;
-x)
enable_debug
;;
-*) error_notify "[ERROR]: Unknown Option: \"${1}\""
usage;;
esac