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

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