misc: fix dist_get failing without failing

License: MIT
Signed-off-by: 's avatarJakub Sztandera <kubuxu@protonmail.ch>
上级 2cc5ce45
......@@ -65,7 +65,8 @@ unarchive() {
tar.gz)
if have_binary tar; then
echo "==> using 'tar' to extract binary from archive"
cat "$ua_infile" | tar -O -z -x -f - "$ua_distname/$ua_distname" > "$ua_outfile"
< "$ua_infile" tar -Ozxf - "$ua_distname/$ua_distname" > "$ua_outfile" \
|| die "tar has failed"
else
die "no binary on system for extracting tar files"
fi
......@@ -73,7 +74,8 @@ unarchive() {
zip)
if have_binary unzip; then
echo "==> using 'unzip' to extract binary from archive"
unzip -p "$ua_infile" "$ua_distname/$ua_distname" > "$ua_outfile"
unzip -p "$ua_infile" "$ua_distname/$ua_distname" > "$ua_outfile" \
|| die "unzip has failed"
else
die "no installed method for extracting .zip archives"
fi
......@@ -82,7 +84,7 @@ unarchive() {
die "unrecognized archive type '$ua_archivetype'"
esac
chmod +x "$ua_outfile"
chmod +x "$ua_outfile" || die "chmod has failed"
}
get_go_vars() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论