Last active
October 20, 2018 03:16
-
-
Save bobziuchkovski/a150f065dca2bbfb7ade56b3e11d8e50 to your computer and use it in GitHub Desktop.
Convert portable Mac OS wine tarballs to wineskin engines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
command -v 7z >/dev/null 2>&1 || ( echo "Error: '7z' binary is missing." >&2; exit 1 ) | |
set -ex | |
VERSION=3.18 | |
PACKAGE="https://dl.winehq.org/wine-builds/macosx/pool/portable-winehq-staging-${VERSION}-osx.tar.gz" | |
ENGINE_DIR="${HOME}/Library/Application Support/Wineskin/Engines" | |
ENGINE_FILE="${ENGINE_DIR}/WS9Wine${VERSION}.tar.7z" | |
if [ -e "${ENGINE_FILE}" ]; then | |
echo "Error: File '$ENGINE_FILE' already exists. Aborting" >&2 | |
exit 1 | |
fi | |
TMPDIR=$(mktemp -d) | |
( | |
cd ${TMPDIR} | |
curl -SL "${PACKAGE}" | tar -zxf - | |
mv usr wswine.bundle | |
echo "wine${VERSION}" > wswine.bundle/VERSION | |
mkdir -p "${ENGINE_DIR}" | |
tar cf - wswine.bundle | 7z a -si "${ENGINE_FILE}" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment