#!/bin/bash
mv * ../
cd ../
if [ -e ../VACATION.GRP ]; then
mv ../VACATION.GRP ./
fi
if [ -e VACATION.GRP ]; then
./kextract VACATION.GRP VACA*.MAP
mv VACA1.MAP vaca1.map
mv VACA2.MAP vaca2.map
mv VACA3.MAP vaca3.map
mv VACA4.MAP vaca4.map
mv VACA5.MAP vaca5.map
mv VACA6.MAP vaca6.map
mv VACA7.MAP vaca7.map
mv VACASL.MAP vacasl.map
mv VACADM1.MAP vacadm1.map
mv VACADM2.MAP vacadm2.map
mv VACADM3.MAP vacadm3.map
mv VACADM4.MAP vacadm4.map
./bspatch vaca1.map vaca1.map vaca1.patch
./bspatch vaca2.map vaca2.map vaca2.patch
./bspatch vaca3.map vaca3.map vaca3.patch
./bspatch vaca4.map vaca4.map vaca4.patch
./bspatch vaca5.map vaca5.map vaca5.patch
./bspatch vaca6.map vaca6.map vaca6.patch
./bspatch vaca7.map vaca7.map vaca7.patch
./bspatch vacasl.map vacasl.map vacasl.patch
./bspatch vacadm1.map vacadm1.map vacadm1.patch
./bspatch vacadm2.map vacadm2.map vacadm2.patch
./bspatch vacadm3.map vacadm3.map vacadm3.patch
./bspatch vacadm4.map vacadm4.map vacadm4.patch
echo "Patching complete!"
else
echo "VACATION.GRP does not exist."
./unpackssi.exe VACA15.SSI
mv VACATION.PRG VACATION.GRP
echo "Run this script again."
echo "If you did not have the SSI files in this directory, put them here and run this twice more."
fi