File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ prepare_directories() {
18
18
download_variant () {
19
19
local Arch=$1
20
20
local Variant=$2
21
+ local Tmpfile=$( mktemp)
21
22
22
23
case $Arch in
23
24
x86) FArch=i686;;
@@ -37,9 +38,19 @@ download_variant() {
37
38
echo " cannot download $Arch $Variant - HTTP Returncode is $HTTPCODE "
38
39
exit 100
39
40
fi
40
- FILE=$( curl --location " https://bouncer.gentoo.org/fetch/root/all/releases/$Arch /autobuilds/latest-stage3-$FArch -$Variant .txt" | sed ' /^#/d' | cut -f1 -d" " )
41
+ curl --location " https://bouncer.gentoo.org/fetch/root/all/releases/$Arch /autobuilds/latest-stage3-$FArch -$Variant .txt" --output $Tmpfile
42
+ # check if file is GPG signed
43
+ local FirstLine=$( head -n1 $Tmpfile )
44
+ if [ " $FirstLine " = " -----BEGIN PGP SIGNED MESSAGE-----" ]
45
+ then
46
+ echo " download done, GPG check:"
47
+ mv " $Tmpfile " " ${Tmpfile} -s"
48
+ gpg --output " $Tmpfile " --verify " ${Tmpfile} -s"
49
+ rm -f " ${Tmpfile} -s"
50
+ fi
51
+ FILE=$( cat $Tmpfile | sed ' /^#/d' | cut -f1 -d" " )
41
52
FILEPATH=" https://bouncer.gentoo.org/fetch/root/all/releases/$Arch /autobuilds/$FILE "
42
-
53
+ rm -f " ${Tmpfile} "
43
54
echo " Download URL: $FILEPATH "
44
55
pause
45
56
curl --remote-name --location --continue-at - " $FILEPATH " && echo " Download successful."
You can’t perform that action at this time.
0 commit comments