Skip to content
Prev Previous commit
Next Next commit
Update makeutils7z
  • Loading branch information
YBronst committed Sep 23, 2025
commit 1366c5331fa3219c657527b6805ee0541cb43d79
20 changes: 10 additions & 10 deletions CloverPackage/makeutils7z
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
set -e
SYSNAME=$(uname)

# Ensure 7z is available on macOS
# Ensure 7-Zip is available on macOS
if [[ "$SYSNAME" == Darwin ]]; then
if ! command -v 7z &>/dev/null; then
if ! command -v 7zz &>/dev/null; then
TMPDIR="/private/tmp/7ztemp"
mkdir -p "$TMPDIR"
cd "$TMPDIR" || exit 1
echo "[7Z] Downloading 7zz..."
echo "[7-Zip] Downloading 7zz..."
curl -LO https://www.7-zip.org/a/7z2501-mac.tar.xz
tar -xf 7z2501-mac.tar.xz
xattr -d com.apple.quarantine 7zz 2>/dev/null || true
sudo cp 7zz /usr/local/bin/7z
chmod +x /usr/local/bin/7z
sudo cp 7zz /usr/local/bin/7zz
chmod +x /usr/local/bin/7zz
cd - >/dev/null || exit 1
rm -rf "$TMPDIR"
echo "[7Z] Installed to /usr/local/bin/7z"
echo "[7-Zip] Installed to /usr/local/bin/7z"
fi
fi

# Check again
if ! command -v 7z &>/dev/null; then
echo "Error: 7z not found. Please install 7-Zip manually."
if ! command -v 7zz &>/dev/null; then
echo "Error: 7zz not found. Please install 7-Zip manually."
exit 1
fi

Expand All @@ -32,8 +32,8 @@ SYMROOT=${SRCROOT}/sym

[[ ! -d "${SYMROOT}/utils" ]] && { echo "No utils folder found."; exit 1; }

echo "[7Z] Packing utils..."
7z a -t7z "${SYMROOT}/utils.7z" "${SYMROOT}/utils" -mx=9
echo "[7-Zip] Packing utils..."
7zz a -t7z "${SYMROOT}/utils.7z" "${SYMROOT}/utils" -mx=9
echo "Done."

# Open folder with archive
Expand Down