#!/bin/bash
mv * ../
cd ../
if [ -e ../VACATION.GRP ]; then
mv ../VACATION.GRP ./
fi
if [ -e VACATION.GRP ]; then
./kextract.linux 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
./uips.linux a vaca1.ips vaca1.map
./uips.linux a vaca2.ips vaca2.map
./uips.linux a vaca3.ips vaca3.map
./uips.linux a vaca4.ips vaca4.map
./uips.linux a vaca5.ips vaca5.map
./uips.linux a vaca6.ips vaca6.map
./uips.linux a vaca7.ips vaca7.map
./uips.linux a vacasl.ips vacasl.map
./uips.linux a vacadm1.ips vacadm1.map
./uips.linux a vacadm2.ips vacadm2.map
./uips.linux a vacadm3.ips vacadm3.map
./uips.linux a vacadm4.ips vacadm4.map
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