diff options
author | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-04-11 12:10:10 -0700 |
---|---|---|
committer | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-04-11 12:10:10 -0700 |
commit | db3056f11730da19e4e56f09f12e300bda62f57c (patch) | |
tree | a5fc96f713bcabc4f5021f8ae8a0647c05a82f88 /tools/get-scala-commit-date.bat | |
parent | b448f13d431a1a4e9d23c6acbf4bd15ccb647e3f (diff) | |
parent | a56a606d540e2453c419687ced722020306952c7 (diff) | |
download | scala-db3056f11730da19e4e56f09f12e300bda62f57c.tar.gz scala-db3056f11730da19e4e56f09f12e300bda62f57c.tar.bz2 scala-db3056f11730da19e4e56f09f12e300bda62f57c.zip |
Merge pull request #369 from scalamacros/topic/fixwinscripts
fix for get-scala-commit-* on Windows (tested with Windows 7)
Diffstat (limited to 'tools/get-scala-commit-date.bat')
-rw-r--r-- | tools/get-scala-commit-date.bat | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/tools/get-scala-commit-date.bat b/tools/get-scala-commit-date.bat index a07155533f..2a75073633 100644 --- a/tools/get-scala-commit-date.bat +++ b/tools/get-scala-commit-date.bat @@ -1,24 +1,9 @@ -@echo off -rem -rem Usage: get-scala-revison.bat [dir] -rem Figures out current scala commit date of a git clone. -rem -rem If no dir is given, current working dir is used. - -@setlocal -set _DIR= -if "%*"=="" ( - for /f "delims=;" %%i in ('cd') do set "_DIR=%%i" -) else ( - set "_DIR=%~1" -) -cd %_DIR% - -rem TODO - Check with a real windows user that this works! -if exist .git\NUL ( - for /f "tokens=1delims= " in ('git log --format="%ci" -1') do set commitdate=%%a - echo %commitdate% -) - -:end -@endlocal +@echo off
+for %%X in (bash.exe) do (set FOUND=%%~$PATH:X)
+if defined FOUND (
+ bash "%~dp0\get-scala-commit-date"
+) else (
+ rem echo this script does not work with cmd.exe. please, install bash
+ echo unknown
+ exit 1
+)
\ No newline at end of file |