This commit is contained in:
joachimschmidt557 2019-11-03 13:07:50 +01:00
parent d572da929b
commit f28bbc2539

11
src
View file

@ -17,6 +17,7 @@ gitrepo() {
## Update/clone this git repo ## Update/clone this git repo
if ! [ -d "$2" ] ; then if ! [ -d "$2" ] ; then
git clone "$1" "$2" git clone "$1" "$2"
updated="$updated $2"
else else
( cd "$2" && git pull ) ( cd "$2" && git pull )
fi fi
@ -28,6 +29,7 @@ tarfile() {
if ! [ -d "$2" ] ; then if ! [ -d "$2" ] ; then
wget "$1" wget "$1"
tar -xf "$1" -C "$2" tar -xf "$1" -C "$2"
updated="$updated $2"
else else
echo "Already downloaded" echo "Already downloaded"
fi fi
@ -58,6 +60,15 @@ parse() {
;; ;;
esac esac
done done
case "$updated" in
"")
echo "Nothing updated"
;;
*)
echo "Updated: $updated"
;;
esac
} }
case "$@" in case "$@" in