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
|
Rev | Line | |
---|
[29230] | 1 | @echo off
|
---|
[29232] | 2 | setlocal
|
---|
[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] | 5 | for /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%b-%%a)
|
---|
[30395] | 6 | echo The current date is %mydate%
|
---|
| 7 |
|
---|
| 8 |
|
---|
[36830] | 9 | :: installdir (C:\expeditee\expeditee-release-kits)
|
---|
[36840] | 10 | set installdir=C:\expeditee\expeditee-release-kits
|
---|
| 11 | cd %installdir%
|
---|
[29232] | 12 |
|
---|
[29230] | 13 | :: Need to edit rke-setup.bat and fill it in with local env vars values
|
---|
[36830] | 14 | if not exist %installdir%\rke-setup.bat (
|
---|
[29230] | 15 | echo.
|
---|
| 16 | echo *******************
|
---|
| 17 | echo.
|
---|
[36830] | 18 | echo First generate %installdir%\rke-setup.bat by copying
|
---|
| 19 | echo %installdir%\rke-setup.bat.in and editing it for your environment
|
---|
[29230] | 20 | echo.
|
---|
| 21 | echo *******************
|
---|
| 22 | echo.
|
---|
| 23 | goto end
|
---|
| 24 | )
|
---|
| 25 |
|
---|
[36830] | 26 | :: call rke-setup.bat to set the environment vars expeditee RK needs
|
---|
[29230] | 27 | call rke-setup.bat
|
---|
[29232] | 28 | if 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] | 36 | pushd %installdir%\snapshots
|
---|
[29230] | 37 | ::http://www.robvanderwoude.com/battech_ifexistfolder.php
|
---|
[30393] | 38 | if exist expeditee\ echo Deleting snapshots\expeditee&& rmdir /s /q expeditee
|
---|
[29230] | 39 | if not exist expeditee\ mkdir expeditee
|
---|
[36830] | 40 | if not exist expeditee\rke-build.properties copy %installdir%\rke-build.properties.in expeditee\rke-build.properties
|
---|
[29232] | 41 | pushd expeditee
|
---|
[36830] | 42 | echo About to call rke
|
---|
[29368] | 43 | call rke
|
---|
[29230] | 44 |
|
---|
[36830] | 45 |
|
---|
| 46 | echo rke done
|
---|
| 47 | echo Getting uploads ready
|
---|
[30395] | 48 | :: Uploading
|
---|
| 49 | mkdir uploads
|
---|
[30399] | 50 | copy products\Expeditee-1%products_suffix%.exe uploads\Expeditee-1-%mydate%%uploads_suffix%.exe
|
---|
[30406] | 51 | copy 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] | 54 | cd uploads && tar.exe -c * | plink -T -i "%identity_file%" [email protected]
|
---|
[29230] | 55 | :end
|
---|
[29368] | 56 |
|
---|
[36830] | 57 | cd %installdir%
|
---|
[29232] | 58 | endlocal
|
---|
[29368] | 59 | ::exit
|
---|
Note:
See
TracBrowser
for help on using the repository browser.