Author: peterw
Date: Thu Oct 25 14:29:36 2007
New Revision: 29873
URL:
http://svn.reactos.org/svn/reactos?rev=29873&view=rev
Log:
- Fix chdefdir.
Modified:
trunk/tools/RosBE-Windows/Root/RosBE.cmd
trunk/tools/RosBE-Windows/Root/chdefdir.cmd
Modified: trunk/tools/RosBE-Windows/Root/RosBE.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/RosBE.cmd…
==============================================================================
--- trunk/tools/RosBE-Windows/Root/RosBE.cmd (original)
+++ trunk/tools/RosBE-Windows/Root/RosBE.cmd Thu Oct 25 14:29:36 2007
@@ -19,7 +19,7 @@
set _ROSBE_BASEDIR=%~dp0
set _ROSBE_BASEDIR=%_ROSBE_BASEDIR:~0,-1%
set _ROSBE_ROSSOURCEDIR=%CD%
-set _ROSBE_PREVIOUSSOURCEDIR=""
+set _ROSBE_PREVIOUSSOURCEDIR=%_ROSBE_ROSSOURCEDIR%
set _ROSBE_SHOWTIME=1
set _ROSBE_WRITELOG=1
set _ROSBE_USECCACHE=0
Modified: trunk/tools/RosBE-Windows/Root/chdefdir.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/chdefdir.…
==============================================================================
--- trunk/tools/RosBE-Windows/Root/chdefdir.cmd (original)
+++ trunk/tools/RosBE-Windows/Root/chdefdir.cmd Thu Oct 25 14:29:36 2007
@@ -5,49 +5,39 @@
:: PURPOSE: Tool to change the current working ReactOS source directory
:: in RosBE.
:: COPYRIGHT: Copyright 2007 Daniel Reimer <reimer.daniel(a)freenet.de>
+:: Peter Ward <dralnix(a)gmail.com>
::
::
@echo off
title Change the current working ReactOS source directory...
-if not %_ROSBE_PREVIOUSSOURCEDIR% == %_ROSBE_ROSSOURCEDIR% (
- set _ROSBE_PREVIOUSSOURCEDIR=%_ROSBE_ROSSOURCEDIR%
-)
-
::
:: Parse the command line arguments.
::
-if /i "%1" == "" (
- goto :INTERACTIVE
+if "%1" == "" (
+ call :INTERACTIVE
+) else (
+ set _1=%1
)
-if /i "%1" == "previous" (
+if "%_1%" == "previous" (
set _ROSBE_ROSSOURCEDIR=%_ROSBE_PREVIOUSSOURCEDIR%
) else (
- if not exist "%1\." (
+ if not exist "%_1%\." (
echo ERROR: The path specified doesn't seem to exist.
goto :EOC
)
- set _ROSBE_ROSSOURCEDIR=%1
+ set _ROSBE_PREVIOUSSOURCEDIR=%_ROSBE_ROSSOURCEDIR%
+ set _ROSBE_ROSSOURCEDIR=%_1%
)
goto :EOC
+::
+:: If Parameters were set, parse them, if not, ask the user to add them.
+::
:INTERACTIVE
-set /p XY="Please enter a ReactOS source directory, or 'previous': "
-
-if /i "%XY%" == "" (
- echo ERROR: You must either enter a valid directory or "previous".
- goto :EOC
-)
-if /i "%XY%"=="previous" (
- set _ROSBE_ROSSOURCEDIR=%_ROSBE_PREVIOUSSOURCEDIR%
-) else (
- if not exist "%XY%\." (
- echo ERROR: The path specified doesn't seem to exist.
- goto :EOC
- )
- set _ROSBE_ROSSOURCEDIR=%XY%
-)
+set /p _1="Please enter a ReactOS source directory, or 'previous': "
+goto :EOF
:EOC
title ReactOS Build Environment %_ROSBE_VERSION%