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
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue