summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-03-26 09:13:46 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-03-26 09:13:46 +0000
commit3d2c54f6d8682a88c1cb38a45d37d4d2ac8817b5 (patch)
tree0818c1223c5ca9e95e64fa12675a2f4ac8b4d663
parent98877bf7001d6f0727c73d6abc1a0724d9841fd8 (diff)
downloadabuild-3d2c54f6d8682a88c1cb38a45d37d4d2ac8817b5.tar.bz2
abuild-3d2c54f6d8682a88c1cb38a45d37d4d2ac8817b5.tar.xz
abuild: add support for https
check if wget is in makedepends. fixes #11
-rwxr-xr-xabuild15
1 files changed, 14 insertions, 1 deletions
diff --git a/abuild b/abuild
index f1febda..c732eb4 100755
--- a/abuild
+++ b/abuild
@@ -81,6 +81,9 @@ sanitycheck() {
if [ -n "$source" ]; then
for i in $source; do
md5sums_has ${i##*/} || die "${i##*/} is missing in md5sums"
+ case "$i" in
+ https://*) makedepends_has wget || die "wget must be in makedepends when source has https://" ;;
+ esac
done
fi
@@ -121,6 +124,12 @@ uri_fetch() {
[ -n "$quiet" ] && opts="-q"
[ -f "$SRCDEST/$d" ] && return 0
+
+ # we need GNU wget for this
+ case "$uri" in
+ https://*) opts="--no-check-certificate";;
+ esac
+
mkdir -p "$SRCDEST"
if [ -f "$SRCDEST/$d.part" ]; then
msg "Partial download found. Trying to resume"
@@ -133,7 +142,7 @@ uri_fetch() {
is_remote() {
case "$1" in
- http://*|ftp://*)
+ http://*|ftp://*|https://*)
return 0;;
esac
return 1
@@ -633,6 +642,10 @@ depends_has() {
list_has "$1" $depends
}
+makedepends_has() {
+ list_has "$1" $makedepends
+}
+
md5sums_has() {
list_has "$1" $md5sums
}