Commit 3d2c54f6 authored by Natanael Copa's avatar Natanael Copa

abuild: add support for https

check if wget is in makedepends.

fixes #11
parent 98877bf7
...@@ -81,6 +81,9 @@ sanitycheck() { ...@@ -81,6 +81,9 @@ sanitycheck() {
if [ -n "$source" ]; then if [ -n "$source" ]; then
for i in $source; do for i in $source; do
md5sums_has ${i##*/} || die "${i##*/} is missing in md5sums" 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 done
fi fi
...@@ -121,6 +124,12 @@ uri_fetch() { ...@@ -121,6 +124,12 @@ uri_fetch() {
[ -n "$quiet" ] && opts="-q" [ -n "$quiet" ] && opts="-q"
[ -f "$SRCDEST/$d" ] && return 0 [ -f "$SRCDEST/$d" ] && return 0
# we need GNU wget for this
case "$uri" in
https://*) opts="--no-check-certificate";;
esac
mkdir -p "$SRCDEST" mkdir -p "$SRCDEST"
if [ -f "$SRCDEST/$d.part" ]; then if [ -f "$SRCDEST/$d.part" ]; then
msg "Partial download found. Trying to resume" msg "Partial download found. Trying to resume"
...@@ -133,7 +142,7 @@ uri_fetch() { ...@@ -133,7 +142,7 @@ uri_fetch() {
is_remote() { is_remote() {
case "$1" in case "$1" in
http://*|ftp://*) http://*|ftp://*|https://*)
return 0;; return 0;;
esac esac
return 1 return 1
...@@ -633,6 +642,10 @@ depends_has() { ...@@ -633,6 +642,10 @@ depends_has() {
list_has "$1" $depends list_has "$1" $depends
} }
makedepends_has() {
list_has "$1" $makedepends
}
md5sums_has() { md5sums_has() {
list_has "$1" $md5sums list_has "$1" $md5sums
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment