Better without subshell

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

8
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,7 +71,8 @@ parse() {
esac esac
} }
case "$@" in for arg in "$@" ; do
case "$arg" in
--help) --help)
usage usage
exit 1 exit 1
@ -80,12 +81,11 @@ case "$@" in
echo "src version 0.1.0" echo "src version 0.1.0"
exit 1 exit 1
;; ;;
"")
;;
*) *)
echo "Invalid command line args" echo "Invalid command line args"
exit 1 exit 1
;; ;;
esac esac
done
parse parse