This commit is contained in:
joachimschmidt557 2020-02-02 20:38:49 +01:00
parent 44bcd42276
commit 2f6e28b08f

20
src
View file

@ -63,17 +63,31 @@ update_tarfile() {
fi
}
update_zipfile() {
## Download and extract this tarfile if it
## doesn't exist yet
if ! [ -d "$2" ] ; then
wget "$1"
unzip "$1" -d "$2"
updated="$updated $2"
else
echo "Already downloaded"
fi
}
update_item() {
## Updates an individual item
echo "Updating: $3"
case "$1" in
"git")
echo "Updating: $3"
update_gitrepo "$2" "$3"
;;
"tar")
echo "Updating: $3"
update_tarfile "$2" "$3"
;;
"zip")
update_zipfile "$2" "$3"
;;
*)
echo "Not a valid source type: $1"
errors="$errors $3"
@ -89,7 +103,7 @@ preproc() {
fi
tmp="$srcfile.tmp"
sed 's/^#.*//; /^\s*$/d' < "$srcfile" > "$tmp"
sed 's/\s*#.*$//; /^\s*$/d' < "$srcfile" > "$tmp"
}
cleanup() {