mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-23 18:50:46 +01:00
Fix export cmd with predefined/default options
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user