Skip to content

Commit 63a9131

Browse files
export: Allow grouping certain options (-ax)
1 parent b064349 commit 63a9131

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

usr/local/share/bastille/export.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ usage() {
5050
--txz Export a jail using simple .txz compressed archive instead.
5151
-v | --verbose Be more verbose during the ZFS send operation.
5252
--xz Export a ZFS jail using XZ(.xz) compressed image.
53-
-x | --debug Enable debug mode.
53+
-x | --debug Enable debug mode.
5454
5555
Note: If no export option specified, the jail should be redirected to standard output.
5656
@@ -179,9 +179,15 @@ else
179179
enable_debug
180180
shift
181181
;;
182-
-*)
183-
error_notify "[ERROR]: Unknown Option: \"${1}\""
184-
usage
182+
-*)
183+
for _opt in $(echo ${1} | sed 's/-//g' | fold -w1); do
184+
case ${_opt} in
185+
a) AUTO=1 ;;
186+
x) enable_debug ;;
187+
*) error_exit "[ERROR]: Unknown Option: \"${1}\""
188+
esac
189+
done
190+
shift
185191
;;
186192
*)
187193
break

0 commit comments

Comments
 (0)