Here is the script for patching BattleForge, described in the Topic "HowTo: Running BattleForge under Crossover Games"
#!/bin/bash
# Script do update BattleForge
# needs to be run in BattleForge directory
IFS="
"
updateversion="261135"
#try to automatically extract the new version
newversion=`cat log.txt | grep "Version Info" | cut -d" " -f5`
if [ -n "${newversion}" ]; then
updateversion="${newversion}"
fi
#data=`cat bf_current.txt`
data="`curl http://na.llnet.battleforge.ea.com/u/f/eagames/battleforge/battleforge/retail/bfc/${updateversion}/bf_current.txt 2>/dev/null`"
if ( echo $data | grep -q "404 Not Found" ); then
echo "Error: Could not download the update file list"
exit 1
fi
mkdir -p tmp
pushd tmp 2>/dev/null
for fileline in $data; do
url=`echo $fileline | awk -F";" '{print $5}'`
file=`basename $url`
filepath=`echo $fileline | awk -F";" '{print $1}'`
newfile=`basename $filepath`
md5sum=`echo $fileline | awk -F";" '{print $4}' | tr "[:lower:]" "[:upper:]"`
#only download files with mismatching md5sum
if [ "${md5sum}" == "`md5sum ../$filepath 2>/dev/null | cut -f1 -d' ' | tr '[:lower:]' '[:upper:]'`" ]; then
#skip this file
echo "file \"${newfile}\" is UpToDate, skipping..."
continue
fi
wget $url
cabextract $file
if [ $? = 1 ]; then
echo $file >> failed.txt
failed = 1
else rm $file
mv $newfile ../$filepath
fi
done
if [ "$filed" = "1" ]; then
echo "FILES FAILED"
cat failed.txt
fi
popd 2>/dev/null