WIP src
This commit is contained in:
parent
d572da929b
commit
f28bbc2539
1 changed files with 11 additions and 0 deletions
11
src
11
src
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue