iankelling.org
/
git
/
distro-setup
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d21aed
)
better arg checking
author
Ian Kelling
<ian@iankelling.org>
Mon, 29 Jul 2019 00:02:41 +0000
(20:02 -0400)
committer
Ian Kelling
<ian@iankelling.org>
Mon, 29 Jul 2019 00:02:41 +0000
(20:02 -0400)
btrbk-run
patch
|
blob
|
history
diff --git
a/btrbk-run
b/btrbk-run
index fa20061128281857e82fcfd444225cb147e4158e..3ec2221d1238b22ab596f71b47e90f54a68365c1 100644
(file)
--- a/
btrbk-run
+++ b/
btrbk-run
@@
-150,9
+150,18
@@
while true; do
esac
done
-#
usefull
commands are resume and archive
+#
only tested
commands are resume and archive
cmd_arg=${1:-run}
+case $cmd_arg in
+ run|resume|archive) : ;;
+ *) die "untested command arg" ;;
+esac
+
+if (( $# > 1 )); then
+ die: "only 1 nonoption arg is supported"
+fi
+
if [[ -v targets && $source ]]; then
die "error: -t and -s are mutually exclusive"
fi