RosBE/RosBE-Windows/Root/chdefdir.cmd
Daniel Reimer f9da5ec3e2 Fixed chdefgcc, charch and chdefdir for PS and Batch.
Fixed version showing when using charch and chdefdir under PS.
Fixed endless loop in update under PS.
Fixed variables to TARGET GCC under PS.
Thx to Jaykul from #powershell

svn path=/trunk/tools/RosBE/; revision=994
2009-05-14 21:50:20 +00:00

48 lines
1.2 KiB
Batchfile

::
:: PROJECT: RosBE - ReactOS Build Environment for Windows
:: LICENSE: GNU General Public License v2. (see LICENSE.txt)
:: FILE: Root/chdefdir.cmd
:: PURPOSE: Tool to change the current working ReactOS source directory
:: in RosBE.
:: COPYRIGHT: Copyright 2009 Daniel Reimer <reimer.daniel@freenet.de>
:: Peter Ward <dralnix@gmail.com>
:: Colin Finck <colin@reactos.org>
::
@echo off
if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
if %_ROSBE_DEBUG% == 1 (
@echo on
)
setlocal enabledelayedexpansion
title Change the current working ReactOS source directory...
:: Parse the command line arguments.
if "%1" == "" (
set /p SOURCEDIR="Please enter a ReactOS source directory, or 'previous': "
if "!SOURCEDIR!" == "" (
echo ERROR: You must enter a ReactOS source directory, or 'previous'.
goto :EOC
)
) else (
set SOURCEDIR=%1
)
if /i "%SOURCEDIR%" == "previous" (
popd
) else (
if not exist "%SOURCEDIR%\." (
echo ERROR: The path specified doesn't seem to exist.
goto :EOC
)
pushd %SOURCEDIR%
)
:EOC
set SOURCEDIR=%CD%
title ReactOS Build Environment %_ROSBE_VERSION%
endlocal & set _ROSBE_ROSSOURCEDIR=%SOURCEDIR%