wip src
This commit is contained in:
parent
44bcd42276
commit
2f6e28b08f
1 changed files with 17 additions and 3 deletions
20
src
20
src
|
|
@ -63,17 +63,31 @@ update_tarfile() {
|
||||||
fi
|
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() {
|
update_item() {
|
||||||
## Updates an individual item
|
## Updates an individual item
|
||||||
|
echo "Updating: $3"
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"git")
|
"git")
|
||||||
echo "Updating: $3"
|
|
||||||
update_gitrepo "$2" "$3"
|
update_gitrepo "$2" "$3"
|
||||||
;;
|
;;
|
||||||
"tar")
|
"tar")
|
||||||
echo "Updating: $3"
|
|
||||||
update_tarfile "$2" "$3"
|
update_tarfile "$2" "$3"
|
||||||
;;
|
;;
|
||||||
|
"zip")
|
||||||
|
update_zipfile "$2" "$3"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Not a valid source type: $1"
|
echo "Not a valid source type: $1"
|
||||||
errors="$errors $3"
|
errors="$errors $3"
|
||||||
|
|
@ -89,7 +103,7 @@ preproc() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tmp="$srcfile.tmp"
|
tmp="$srcfile.tmp"
|
||||||
sed 's/^#.*//; /^\s*$/d' < "$srcfile" > "$tmp"
|
sed 's/\s*#.*$//; /^\s*$/d' < "$srcfile" > "$tmp"
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue