REM This file bootstraps the update process
REM The downloaded zip archive is extracted on top of the installation
REM Any contained files replace the client's current version.

REM variable %1 is passed in from "Run OUNPPM.bat" and is the name of the
REM downloaded .zip file update to be applied.

echo var is %1

.\updates\unzip -o .\updates\dl\\%1 -d .\

REM After the extraction is complete. The update may optionally execute
REM its own script to extend the update behavior. That script must always
REM be extracted to the root of the installation and be called UpdateClient.bat
REM UpdateClient.bat must clean up after itself (remove any of its unneeded files
REM after the update is applied).

call .\UpdateClient.bat
echo "Done Running UpdateClient"
del /Q /F .\UpdateClient.bat
del /Q /F .\updates\dl\\*.apply


REM After UpdateClient.bat has executed and cleaned up after itself,
REM the bootstrapper removes the bat and the update is complete.
