#!/bin/bash
mv * ../
cd ../
if [ -e ../NWINTER.GRP ]; then
mv ../NWINTER.GRP ./
fi
if [ -e NWINTER.GRP ]; then
./kextract.linux NWINTER.GRP E2L*.MAP
mv E2L1.MAP nwl1.map
mv E2L2.MAP nwl2.map
mv E2L3.MAP nwl3.map
mv E2L4.MAP nwl4.map
mv E2L5.MAP nwl5.map
mv E2L6.MAP nwl6.map
mv E2L7.MAP nwl7.map
mv E2L8.MAP nwl8.map
./uips.linux a nwl1.ips nwl1.map
./uips.linux a nwl2.ips nwl2.map
./uips.linux a nwl3.ips nwl3.map
./uips.linux a nwl4.ips nwl4.map
./uips.linux a nwl5.ips nwl5.map
./uips.linux a nwl6.ips nwl6.map
./uips.linux a nwl7.ips nwl7.map
./uips.linux a nwl8.ips nwl8.map
echo "Patching complete!"
else
echo "NWINTER.GRP does not exist."
echo "Run this script again with NWINTER.GRP in this directory."
fi