Skip to content

Instantly share code, notes, and snippets.

@m0rb
Created May 19, 2017 23:25
Show Gist options
  • Save m0rb/fa26cb3b2395595d6fab0810cd719f61 to your computer and use it in GitHub Desktop.
Save m0rb/fa26cb3b2395595d6fab0810cd719f61 to your computer and use it in GitHub Desktop.
"Shadow Warrior Original" (from Steam) prep script for jfsw port on *nix
#!/bin/bash
# "Shadow Warrior Original" -> jfsw prep script
# 5/19/17 - chris_commat_misentropic_commercial
#
#
# Run this from a directory where you copied the 'gameroot' contents
# from the Steam version of SW.
#
# Place the 'sw' binary there as well.
# Have fun!
#
# Deps: dosbox
linklc() {
for files in $@
do
A=$(basename $files)
ln -s $files ./${A,,}
done
}
linkem() {
for files in $@
do
A=$(basename $files)
ln -s $files ./${A}
done
}
dosextract() {
mkdir data
cp build/KEXTRACT.EXE data
cp Sw.grp data
printf "@echo off\nkextract.exe sw.grp *.*\n" > data/extract.bat
dosbox -exit data/extract.bat
rm data/KEXTRACT.EXE data/Sw.grp data/extract.bat
}
dosextract
for lc in 'data/*.ART' 'data/*.ANM' 'data/*.KVX' 'data/*.MAP' 'data/*.PAL' \
'data/*.SYM' 'data/*.TXT' 'build/*.DAT' 'MUSIC/*'
do linklc "$lc"
done
linkem data/*.VOC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment