This repository has been archived by the owner on Feb 16, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Markus Perndorfer
committed
Nov 3, 2018
1 parent
9f5f56d
commit dd1e578
Showing
2 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
@setlocal ENABLEEXTENSIONS | ||
|
||
@set current=%cd% | ||
@for /F %%I in ("%current%") do @set root=%%~dI | ||
|
||
:loop | ||
@if EXIST "%current%\hybris\bin\platform\*" ( | ||
@set platform=%current%\hybris\bin\platform | ||
) | ||
@call :dirname "%current%" current | ||
@IF NOT DEFINED platform IF NOT "%current%"=="%root%" goto :loop | ||
|
||
@IF DEFINED platform ( | ||
@cd "%platform%" | ||
@IF "%1"=="ant" ( | ||
@call setantenv.bat | ||
) | ||
@%COMSPEC% /c %* | ||
) ELSE ( | ||
echo Could not find hybris/bin/platform folder, will NOT execute '%*' 1>&2 | ||
@EXIT /B 1 | ||
) | ||
|
||
@endlocal | ||
@goto:EOF | ||
|
||
:dirname file varName | ||
@setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | ||
@SET _dir=%~dp1 | ||
@SET _dir=%_dir:~0,-1% | ||
@endlocal & set %2=%_dir% | ||
@goto:EOF |