diff options
author | Oren Hurvitz | 2013-12-03 09:08:35 +0200 |
---|---|---|
committer | Oren Hurvitz | 2014-03-24 12:26:53 +0100 |
commit | 425d76bb982c6fb41554a50035b8fce9350078ca (patch) | |
tree | d5687cb5f3eba4326360599f9b04b1e14e5978ec /runprebuild.bat | |
parent | Get the full viewer name even if it's (incorrectly) sent in the 'Channel' field (diff) | |
download | opensim-SC_OLD-425d76bb982c6fb41554a50035b8fce9350078ca.zip opensim-SC_OLD-425d76bb982c6fb41554a50035b8fce9350078ca.tar.gz opensim-SC_OLD-425d76bb982c6fb41554a50035b8fce9350078ca.tar.bz2 opensim-SC_OLD-425d76bb982c6fb41554a50035b8fce9350078ca.tar.xz |
Enable runprebuild.bat to run in Cygwin
This resolves http://opensimulator.org/mantis/view.php?id=6951
Diffstat (limited to '')
-rwxr-xr-x | runprebuild.bat | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/runprebuild.bat b/runprebuild.bat index 5f75982..ed2def1 100755 --- a/runprebuild.bat +++ b/runprebuild.bat | |||
@@ -7,11 +7,19 @@ setlocal ENABLEEXTENSIONS | |||
7 | set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" | 7 | set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" |
8 | set VALUE_NAME=MSBuildToolsPath | 8 | set VALUE_NAME=MSBuildToolsPath |
9 | 9 | ||
10 | rem We have to use find here as req query spits out 4 lines before Windows 7 | 10 | rem We have to use grep or find to locate the correct line, because reg query spits |
11 | rem But 2 lines after Windows 7. Unfortunately, this screws up cygwin | 11 | rem out 4 lines before Windows 7 but 2 lines after Windows 7. |
12 | rem as it uses its own find command. This could be fixed but it could be | 12 | rem We use grep if it's on the path; otherwise we use the built-in find command |
13 | rem complex to find the location of find on all windows systems | 13 | rem from Windows. (We must use grep on Cygwin because it overrides the "find" command.) |
14 | FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul ^| FIND "%VALUE_NAME%"`) DO ( | 14 | |
15 | for %%X in (grep.exe) do (set FOUNDGREP=%%~$PATH:X) | ||
16 | if defined FOUNDGREP ( | ||
17 | set FINDCMD=grep | ||
18 | ) else ( | ||
19 | set FINDCMD=find | ||
20 | ) | ||
21 | |||
22 | FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul ^| %FINDCMD% "%VALUE_NAME%"`) DO ( | ||
15 | set ValueName=%%A | 23 | set ValueName=%%A |
16 | set ValueType=%%B | 24 | set ValueType=%%B |
17 | set ValueValue=%%C | 25 | set ValueValue=%%C |