Created
November 17, 2016 17:21
-
-
Save Caesim404/756c7ae1530007dc30a1741936c5464c to your computer and use it in GitHub Desktop.
Sven Co-op's Install_bshift_Support.bat port to bash.
This file contains hidden or 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
#!/usr/bin/env bash | |
HLDIR="/home/caesim/.local/share/Steam/steamapps/common/Half-Life" | |
SCDIR="/home/caesim/.local/share/Steam/steamapps/common/Sven Co-op Dedicated Server/svencoop" | |
szGame="Blue Shift" | |
szModDir="bshift" | |
scVersion="5.0" | |
if [ "$(uname -m)" == "x86_64" ]; then | |
ripent=ripent | |
else | |
ripent=ripent_32 | |
fi | |
mapList=( | |
ba_canal1 ba_canal1b ba_canal2 ba_canal3 ba_elevator ba_maint ba_outro ba_power1 ba_power2 | |
ba_security1 ba_security2 ba_teleport1 ba_teleport2 ba_tram1 ba_tram2 ba_tram3 | |
ba_xen1 ba_xen2 ba_xen3 ba_xen4 ba_xen5 ba_xen6 | |
ba_yard1 ba_yard2 ba_yard3 ba_yard3a ba_yard3b ba_yard4 ba_yard4a ba_yard5 ba_yard5a | |
) | |
szBaseContentDir=$HLDIR/$szModDir | |
if [ ! -d "$szBaseContentDir" ]; then | |
echo Could not find $szBaseContentDir directory | |
echo Check that $szGame is installed | |
exit | |
fi | |
echo | |
echo -= Half-Life: $szGame map support for Sven Co-op $scVersion =- | |
echo | |
echo Warning: Around 80MB of free disk space required. | |
echo Installation may take a few minutes\; please be patient. | |
echo | |
echo | |
echo ---------------------------------------------------------------------------- | |
echo IMPORTANT: To install $szGame support, you must own \'Half-Life: | |
echo $szGame\' and have it fully downloaded and installed! | |
echo ---------------------------------------------------------------------------- | |
echo | |
cd "$SCDIR" | |
if [ ! -f "maps/$ripent" ]; then | |
echo Missing $ripent | |
exit | |
fi | |
if [ ! -f "$szBaseContentDir/maps/${mapList[0]}.bsp" ]; then | |
echo Missing maps | |
exit | |
fi | |
echo | |
echo Copying official maps from installed game... | |
echo | |
for m in "${mapList[@]}"; do | |
cp "$szBaseContentDir/maps/$m.bsp" maps/ | |
done | |
cp "$szBaseContentDir/gfx/env/*" gfx/env/ | |
echo | |
echo -= Valve\'s original Half-Life $szGame maps have been copied. =- | |
echo | |
echo | |
echo Preparing... | |
echo | |
unzip -o bshift_support.sven -d maps | |
cd maps | |
echo | |
echo Converting BSP format... | |
echo | |
for m in "${mapList[@]}"; do | |
../BShiftBSPConverter $m.bsp | |
done | |
echo | |
echo Importing entity data... | |
echo | |
for m in "${mapList[@]}"; do | |
./$ripent -import -noinfo $m.bsp | |
done | |
echo | |
echo Flushing temporary data... | |
echo | |
rm ba_*.ent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment