42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
if [ -s "${file}" ]; then
return 0
fi
rm -f "${file}.tmp" "${file}"
wget -O "${file}.tmp" "${url}" || return 1
mv "${file}.tmp" "${file}"
}
function download_src () {
if [ ! -f "${SRC}" -a -n "${SRC}" -a -n "${SRCURL}" ]; then
mkdir -p "$(dirname "${SRC}")" >/dev/null 2>/dev/null
|
>
>
>
|
>
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
if [ -s "${file}" ]; then
return 0
fi
rm -f "${file}.tmp" "${file}"
if echo "${url}" | grep '^https://' >/dev/null; then
wget --ca-certificate='../certs.pem' -O "${file}.tmp" "${url}" || return 1
else
wget -O "${file}.tmp" "${url}" || return 1
fi
mv "${file}.tmp" "${file}"
}
function download_src () {
if [ ! -f "${SRC}" -a -n "${SRC}" -a -n "${SRCURL}" ]; then
mkdir -p "$(dirname "${SRC}")" >/dev/null 2>/dev/null
|