Allowed a Wineprefix to be specified as first argument

This commit is contained in:
Nicholas George 2020-01-13 22:40:07 +00:00 committed by GitHub
parent 0c2109dd2d
commit d1f5356549
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,14 @@
#!/bin/bash #!/bin/bash
export WINEPREFIX=$HOME/.local/share/wineprefixes/worlds export WINEPREFIX=$1
export WINEARCH=win32 export WINEARCH=win32
export DIR="$WINEPREFIX/drive_c/Program Files/Worlds/WorldsPlayer by Worlds.com" export DIR="$WINEPREFIX/drive_c/Program Files/Worlds/WorldsPlayer by Worlds.com"
export DIREXE="$DIR/run.exe" export DIREXE="$DIR/run.exe"
prefix () { prefix () {
echo "Settings up the Wine prefix..." echo "Settings up the Wine prefix..."
if [ -z "$WINEPREFIX" ]; then
WINEPREFIX=$HOME/.local/share/wineprefixes/worlds
fi
wine init wine init
if ! [ -x "$(command -v winetricks)" ]; then if ! [ -x "$(command -v winetricks)" ]; then
echo "Error: 'winetricks' not found! Please add it to your path or install it via your package manager." echo "Error: 'winetricks' not found! Please add it to your path or install it via your package manager."