File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,8 @@ CONFIGDIR='REPRO_CONFIG_DIR'
1111# # Hardcoded until further notice
1212HOSTMIRROR=" http://mirror.neuf.no/archlinux/\$ repo/os/\$ arch"
1313
14- # IMGDIRECTORY=$(mktemp -dt .arch_img)
15- IMGDIRECTORY=" /tmp/arch_img"
16- mkdir -p $IMGDIRECTORY
14+ IMGDIRECTORY=$( mktemp -dt XXXXXXXXXX.arch_img)
15+ trap " { rm -r $IMGDIRECTORY ; }" EXIT
1716
1817DIFFOSCOPE=" diffoscope"
1918
@@ -283,16 +282,14 @@ __END__
283282
284283# Desc: Fetches a bootstrap image and verifies the signature
285284function get_bootstrap_img() {
286- trap ' { rm "$IMGDIRECTORY/$bootstrap_img"{,.sig} ; exit 1; }' ERR
287285 if [ ! -e " $IMGDIRECTORY /$bootstrap_img " ]; then
288286 msg " Downloading bootstrap image..."
289- ( cd " $IMGDIRECTORY " && curl --remote-name-all " $BOOTSTRAPMIRROR /$bootstrap_img " {,.sig} )
287+ ( cd " $IMGDIRECTORY " && curl -f - -remote-name-all " $BOOTSTRAPMIRROR /$bootstrap_img " {,.sig} )
290288 if ! gpg --verify " $IMGDIRECTORY /$bootstrap_img .sig" " $IMGDIRECTORY /$bootstrap_img " ; then
291289 error " Can't verify image"
292290 exit 1
293291 fi
294292 fi
295- trap - ERR
296293}
297294
298295# Desc: Prints the help section
339336# Save command args (such as path to .pkg.tar.xz file)
340337shift $(( OPTIND- 1 ))
341338
342- get_bootstrap_img
343339check_root
340+ test -d " $BUILDDIRECTORY " /root || get_bootstrap_img
344341init_chroot
345342cmd_check " $@ "
You can’t perform that action at this time.
0 commit comments