aboutsummaryrefslogtreecommitdiff
path: root/lib/arg_processing.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arg_processing.sh')
-rw-r--r--lib/arg_processing.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/arg_processing.sh b/lib/arg_processing.sh
new file mode 100644
index 0000000..d8fb92c
--- /dev/null
+++ b/lib/arg_processing.sh
@@ -0,0 +1,9 @@
+#! Check script arguments.
+
+check_arg_side() {
+ local side="$1"
+ if ! [ "$side" == "left" -o "$side" == "right" ]; then
+ echo "Argument must be must be the side to handle {left, right} and not \"${side}\"."
+ exit 1
+ fi
+}