source: other-projects/expeditee-release-kits/trunk/create-expeditee.bat@ 37978

Last change on this file since 37978 was 37978, checked in by anupama, 10 months ago

For now adding .exe suffix to tar command seems to get expeditee uploaded from windows to the remote machine, but I'm still not sure why it made any difference. Committing anyway as it's no worse than before and may be better (since it works).

File size: 1.9 KB
RevLine 
[29230]1@echo off
[29232]2setlocal
[29230]3
[30395]4:: http://stackoverflow.com/questions/203090/how-to-get-current-datetime-on-windows-command-line-in-a-suitable-format-for-us
[30405]5for /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%b-%%a)
[30395]6echo The current date is %mydate%
7
8
[36830]9:: installdir (C:\expeditee\expeditee-release-kits)
[36840]10set installdir=C:\expeditee\expeditee-release-kits
11cd %installdir%
[29232]12
[29230]13:: Need to edit rke-setup.bat and fill it in with local env vars values
[36830]14if not exist %installdir%\rke-setup.bat (
[29230]15echo.
16echo *******************
17echo.
[36830]18echo First generate %installdir%\rke-setup.bat by copying
19echo %installdir%\rke-setup.bat.in and editing it for your environment
[29230]20echo.
21echo *******************
22echo.
23goto end
24)
25
[36830]26:: call rke-setup.bat to set the environment vars expeditee RK needs
[29230]27call rke-setup.bat
[29232]28if ERRORLEVEL 1 (
[36830]29 echo error level 1 or more
[29232]30 exit /B 1
31)
[29230]32
33
34:: Make sure the expeditee folder and its rke-build.properties file exist
35:: Then run the 'rke' command from snapshots\expeditee
[36830]36pushd %installdir%\snapshots
[29230]37::http://www.robvanderwoude.com/battech_ifexistfolder.php
[30393]38if exist expeditee\ echo Deleting snapshots\expeditee&& rmdir /s /q expeditee
[29230]39if not exist expeditee\ mkdir expeditee
[36830]40if not exist expeditee\rke-build.properties copy %installdir%\rke-build.properties.in expeditee\rke-build.properties
[29232]41pushd expeditee
[36830]42echo About to call rke
[29368]43call rke
[29230]44
[36830]45
46echo rke done
47echo Getting uploads ready
[30395]48:: Uploading
49mkdir uploads
[30399]50copy products\Expeditee-1%products_suffix%.exe uploads\Expeditee-1-%mydate%%uploads_suffix%.exe
[30406]51copy rke.out uploads\rke-%mydate%%os_suffix%-windows.out
[30397]52
[36830]53:: For now, we are uploading to www-internal. authorised_keys at that end will untar into /greenstone/files/expeditee
[37978]54cd uploads && tar.exe -c * | plink -T -i "%identity_file%" [email protected]
[29230]55:end
[29368]56
[36830]57cd %installdir%
[29232]58endlocal
[29368]59::exit
Note: See TracBrowser for help on using the repository browser.