Better without subshell
This commit is contained in:
parent
f28bbc2539
commit
fb9766fe5f
1 changed files with 17 additions and 17 deletions
8
src
8
src
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue