Skip to content

Commit

Permalink
release-macos: Don't assume that gtar is available on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mstorsjo committed Feb 13, 2024
1 parent 8caf376 commit 3ed3b66
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion release-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ rm -rf $DEST
time CLEAN=1 SYNC=1 MACOS_REDIST=1 ./build-all.sh $DEST
dir=$(pwd)
cd $HOME
gtar -Jcvf $dir/$RELNAME.tar.xz --format=ustar --numeric-owner --owner=0 --group=0 $RELNAME
TAR=tar
if command -v gtar >/dev/null; then
TAR_FLAGS="--numeric-owner --owner=0 --group=0"
TAR=gtar
fi
$TAR -Jcvf $dir/$RELNAME.tar.xz --format=ustar $TAR_FLAGS $RELNAME
rm -rf $RELNAME
cd $dir
ls -lh $RELNAME.tar.xz

0 comments on commit 3ed3b66

Please sign in to comment.