Better without subshell

This commit is contained in:
joachimschmidt557 2019-11-03 17:04:28 +01:00
parent f28bbc2539
commit fb9766fe5f

34
src
View file

@ -19,7 +19,7 @@ gitrepo() {
git clone "$1" "$2" git clone "$1" "$2"
updated="$updated $2" updated="$updated $2"
else else
( cd "$2" && git pull ) git -C "$2" pull
fi fi
} }
@ -71,21 +71,21 @@ parse() {
esac esac
} }
case "$@" in for arg in "$@" ; do
--help) case "$arg" in
usage --help)
exit 1 usage
;; exit 1
--version) ;;
echo "src version 0.1.0" --version)
exit 1 echo "src version 0.1.0"
;; exit 1
"") ;;
;; *)
*) echo "Invalid command line args"
echo "Invalid command line args" exit 1
exit 1 ;;
;; esac
esac done
parse parse