@echo off
SETLOCAL
set CURDIR=%cd%
set PKGDIR=%~dp0..
set subScript=upgrade.bat

cd "%PKGDIR%\script"
call stop.bat

call :ExecSubScript "%subScript%"
ENDLOCAL
goto :eof

:ExecSubScript
set script=%1
cd /d "%PKGDIR%/script"
for /D %%i in (*) do (
    cd /d %%i
    if exist %script% (
		echo "%%i %script%"
		call %script%
	)
    cd /d "%PKGDIR%/script"
)
cd /d "%CURDIR%"
goto :eof