From 8e652556786949b424974f980c83058fa96e6350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Uruba?= Date: Sat, 9 Sep 2023 19:11:33 +0200 Subject: [PATCH] accept option to specify working directory --- mige.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mige.sh b/mige.sh index 15794e6..6495511 100755 --- a/mige.sh +++ b/mige.sh @@ -18,10 +18,11 @@ check_files () { } read_options() { - while getopts "a" opt; do + while getopts "ad:" opt; do case "${opt}" in a) OPTION_ASSETS=true;; - \?) ;; + d) SOURCEDIR=$OPTARG;; + \?) exit 2;; esac done }