File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,13 @@ for to_arch in $to_archs; do
49
49
if [ " $from_arch " != " $to_arch " ]; then
50
50
work_dir=" ${out_dir} /${from_arch} _qemu-${to_arch} "
51
51
mkdir -p " ${work_dir} "
52
- curl -sSL -o " ${work_dir} /${from_arch} _qemu-${to_arch} -static.tar.gz" \
53
- " https://github.com/${REPO} /releases/download/v${VERSION} /${from_arch} _qemu-${to_arch} -static.tar.gz"
52
+ tar_gz_url=" https://github.com/${REPO} /releases/download/v${VERSION} /${from_arch} _qemu-${to_arch} -static.tar.gz"
53
+ http_status=" $( curl -s -o /dev/null -w " %{http_code}" " ${tar_gz_url} " ) "
54
+ if [ " ${http_status} " = 404 ]; then
55
+ echo " URL not found: ${tar_gz_url} " 1>&2
56
+ exit 1
57
+ fi
58
+ curl -sSL -o " ${work_dir} /${from_arch} _qemu-${to_arch} -static.tar.gz" " ${tar_gz_url} "
54
59
tar xzvf " ${work_dir} /${from_arch} _qemu-${to_arch} -static.tar.gz" -C " ${work_dir} "
55
60
rm -f " ${work_dir} /${from_arch} _qemu-${to_arch} -static.tar.gz"
56
61
You can’t perform that action at this time.
0 commit comments