Skip to content

Commit

Permalink
Fix --one-top-level not avail in bsd tar
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy committed Dec 18, 2024
1 parent b561977 commit 2b2ca34
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion foundryup/foundryup
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,13 @@ main() {
ensure unzip "$tmp" -d "$FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_TAG"
rm -f "$tmp"
else
ensure download "$BIN_ARCHIVE_URL" | ensure tar -xz --one-top-level="$FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_TAG"
tmp="$(mktemp -d 2>/dev/null || echo ".")/foundry.tar.gz"
ensure download "$BIN_ARCHIVE_URL" "$tmp"
# Make sure it's a valid tar archive.
ensure tar tf $tmp 1> /dev/null
ensure mkdir -p $FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_TAG
ensure tar -C "$FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_TAG" -xvf $tmp
rm -f "$tmp"
fi

# Optionally download the manuals
Expand Down

0 comments on commit 2b2ca34

Please sign in to comment.