src_prepare-overlay/games-rpg/fallout1/files/fallout1_wine

33 lines
776 B
Bash

#!/usr/bin/env bash
set -xeuo pipefail
WINEPREFIX=~/.wine_fallout1
WINEARCH=win32
if [ ! -d ~/.local/share/Fallout1 ]; then
mkdir -p ~/.local/share/Fallout1
pushd ~/.local/share/Fallout1
for i in $(ls /usr/share/games/fallout1 | grep -vE '^fallout\.cfg$|^DATA$'); do
ln -s /usr/share/games/fallout1/$i $i
done
cp /usr/share/games/fallout1/fallout.cfg .
mkdir DATA
pushd DATA
for i in $(ls /usr/share/games/fallout1/DATA | grep -vE '^SAVEGAME$|^MAPS$'); do
ln -s /usr/share/games/fallout1/DATA/$i $i
done
mkdir SAVEGAME
mkdir MAPS
pushd MAPS
for i in $(ls /usr/share/games/fallout1/DATA/MAPS); do
ln -s /usr/share/games/fallout1/DATA/MAPS/$i $i
done
popd
popd
popd
fi
pushd ~/.local/share/Fallout1
wine falloutw.exe
popd