summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-04-11 14:59:48 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-04-11 15:00:53 +0200
commita56a606d540e2453c419687ced722020306952c7 (patch)
treea5fc96f713bcabc4f5021f8ae8a0647c05a82f88 /tools
parentb448f13d431a1a4e9d23c6acbf4bd15ccb647e3f (diff)
downloadscala-a56a606d540e2453c419687ced722020306952c7.tar.gz
scala-a56a606d540e2453c419687ced722020306952c7.tar.bz2
scala-a56a606d540e2453c419687ced722020306952c7.zip
fix for get-scala-commit-* on Windows (tested with Windows 7)
Diffstat (limited to 'tools')
-rw-r--r--tools/get-scala-commit-date.bat33
-rw-r--r--tools/get-scala-commit-sha.bat30
2 files changed, 18 insertions, 45 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
diff --git a/tools/get-scala-commit-sha.bat b/tools/get-scala-commit-sha.bat
index 7a5afa11b1..390e2d99d0 100644
--- a/tools/get-scala-commit-sha.bat
+++ b/tools/get-scala-commit-sha.bat
@@ -1,21 +1,9 @@
-@echo off
-rem
-rem Usage: get-scala-commit-drift.bat [dir]
-rem Figures out current scala commit drift, of a 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 - truncate chars.
-git log -1 --format="%H
-
-:end
-@endlocal
+@echo off
+for %%X in (bash.exe) do (set FOUND=%%~$PATH:X)
+if defined FOUND (
+ bash "%~dp0\get-scala-commit-sha"
+) else (
+ rem echo this script does not work with cmd.exe. please, install bash
+ echo unknown
+ exit 1
+) \ No newline at end of file