Skip to content

Commit

Permalink
Fix compression for non-GNU tar (#782)
Browse files Browse the repository at this point in the history
This fixes a problem reported on MacOS, where the "standard" tar is BSD tar.
That one interprets the `-I` argument differently.
  • Loading branch information
TimoWilken authored Oct 26, 2022
1 parent 376ea4d commit 669a080
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions alibuild_helpers/build_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ if [ "$CAN_DELETE" = 1 ]; then
rm -f "$WORK_DIR/TARS/$HASH_PATH/$PACKAGE_WITH_REV"
elif [ -z "$CACHED_TARBALL" ]; then
# We don't have an existing tarball, and we want to keep the one we create now.
# Avoid having broken left overs if the tar fails
tar -cf "$WORK_DIR/TARS/$HASH_PATH/$PACKAGE_WITH_REV.processing" \
-C "$WORK_DIR/INSTALLROOT/$PKGHASH" -I "$MY_GZIP" .
tar -cC "$WORK_DIR/INSTALLROOT/$PKGHASH" . |
# Avoid having broken left overs if the tar fails.
$MY_GZIP -c > "$WORK_DIR/TARS/$HASH_PATH/$PACKAGE_WITH_REV.processing"
mv "$WORK_DIR/TARS/$HASH_PATH/$PACKAGE_WITH_REV.processing" \
"$WORK_DIR/TARS/$HASH_PATH/$PACKAGE_WITH_REV"
ln -nfs "../../$HASH_PATH/$PACKAGE_WITH_REV" \
Expand Down

0 comments on commit 669a080

Please sign in to comment.