Update Script:

- Removed the 7z command line tool loading routine. It's included in RosBE now.
- Added some status messages to see the update command finished its job or not. Credits for this go to gabriel_it.

svn path=/trunk/tools/RosBE/; revision=1157
This commit is contained in:
Daniel Reimer 2010-01-15 15:15:26 +00:00
parent d702a737de
commit 0f8180bca4
2 changed files with 9 additions and 13 deletions

View File

@ -80,12 +80,6 @@ $_ROSBE_URL = "http://dreimer.bplaced.net/rosbe"
# Save the recent dir to cd back there at the end.
$_ROSBE_OPATH = "$pwd"
if (!(Test-Path "$_ROSBE_BASEDIR\Tools\7z.exe")) {
set-location "$_ROSBE_BASEDIR\Tools"
get-webfile $_ROSBE_URL/7z.exe $PWD\7z.exe
set-location $_ROSBE_OPATH
}
set-location $_ROSBE_BASEDIR
# First check for a new Updater.
@ -111,16 +105,20 @@ if ("$($args[2])" -eq "") {
UPDCHECK
$_ROSBE_STATCOUNT += 1
}
"Update finished..."
} elseif ("$($args[2])" -eq "reset") {
remove-item "$ENV:APPDATA\RosBE\Updates\*.*" -force -recurse -EA SilentlyContinue
remove-item "$ENV:APPDATA\RosBE\Updates\tmp\*.*" -force -recurse -EA SilentlyContinue
"Update Statistics resetted..."
} elseif ("$($args[2])" -eq "nr") {
$_ROSBE_STATCOUNT = $($args[3])
UPDCHECK
echo Update Nr:$($args[3]) installed...
} elseif ("$($args[2])" -eq "delete") {
$_ROSBE_STATCOUNT = $($args[3])
remove-item "$ENV:APPDATA\RosBE\Updates\$_ROSBE_VERSION-$_ROSBE_STATCOUNT.*" -force -recurse -EA SilentlyContinue
remove-item "$ENV:APPDATA\RosBE\Updates\tmp\$_ROSBE_VERSION-$_ROSBE_STATCOUNT.*" -force -recurse -EA SilentlyContinue
"Update-$($args[3]) Statistics resetted..."
} elseif ("$($args[2])" -eq "info") {
$_ROSBE_STATCOUNT = $($args[3])
set-location tmp

View File

@ -22,12 +22,6 @@ set _ROSBE_URL=http://dreimer.bplaced.net/rosbe
:: Save the recent dir to cd back there at the end.
set _ROSBE_OPATH=%CD%
if not exist "%_ROSBE_BASEDIR%\Tools\7z.exe" (
cd /d "%_ROSBE_BASEDIR%\Tools"
wget.exe -N --ignore-length --no-verbose %_ROSBE_URL%/7z.exe 1> NUL 2> NUL
cd /d %_ROSBE_OPATH%
)
cd /d %_ROSBE_BASEDIR%
:: First check for a new Updater
@ -49,16 +43,20 @@ if "%1" == "" (
set _ROSBE_MULTIUPD=1
set _ROSBE_STATCOUNT=1
call :WHILE
echo Update finished...
) else if /i "%1" == "reset" (
del /F /Q "%APPDATA%\RosBE\Updates\*.*" 1> NUL 2> NUL
del /F /Q "%APPDATA%\RosBE\Updates\tmp\*.*" 1> NUL 2> NUL
echo Update Statistics resetted...
) else if /i "%1" == "nr" (
set _ROSBE_STATCOUNT=%2
call :UPDCHECK
echo Update Nr:%2 installed...
) else if /i "%1" == "delete" (
set _ROSBE_STATCOUNT=%2
del /F /Q "%APPDATA%\RosBE\Updates\%_ROSBE_VERSION%-!_ROSBE_STATCOUNT!.*" 1> NUL 2> NUL
del /F /Q "%APPDATA%\RosBE\Updates\tmp\%_ROSBE_VERSION%-!_ROSBE_STATCOUNT!.*" 1> NUL 2> NUL
echo Update-%2 Statistics resetted...
) else if /i "%1" == "info" (
set _ROSBE_STATCOUNT=%2
cd tmp
@ -72,7 +70,7 @@ if "%1" == "" (
)
)
cd..
del /F /Q tmp\*.* 1> NUL 2> NUL
del /F /Q tmp\*.* 1> NUL 2> NUL
) else if /i "%1" == "status" (
set _ROSBE_STATCOUNT=1
if not exist "tmp" mkdir tmp 1> NUL 2> NUL