[ros-diffs] [dreimer] 27390: - Add a check if the Source Dir exists. If not, create it to be able to checkout to it. - Try to fix "svn create". (At last it "works" now) Here I need your help. How can I find out if the folder is empty? *.* in a folder is always true when the folder exists....

dreimer at svn.reactos.org dreimer at svn.reactos.org
Wed Jul 4 18:26:40 CEST 2007


Author: dreimer
Date: Wed Jul  4 20:26:39 2007
New Revision: 27390

URL: http://svn.reactos.org/svn/reactos?rev=27390&view=rev
Log:
- Add a check if the Source Dir exists. If not, create it to be able to checkout to it.
- Try to fix "svn create". (At last it "works" now) Here I need your help. How can I find out if the folder is empty? *.* in a folder is always true when the folder exists....

Modified:
    trunk/tools/RosBE-Windows/Root/RosBE.cmd
    trunk/tools/RosBE-Windows/Root/SVN.cmd

Modified: trunk/tools/RosBE-Windows/Root/RosBE.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/RosBE.cmd?rev=27390&r1=27389&r2=27390&view=diff
==============================================================================
--- trunk/tools/RosBE-Windows/Root/RosBE.cmd (original)
+++ trunk/tools/RosBE-Windows/Root/RosBE.cmd Wed Jul  4 20:26:39 2007
@@ -30,6 +30,9 @@
 :: Save our initial directory (should be the ReactOS source directory)
 ::
 set _ROSSOURCEDIR=%CD%
+if not exist "%_ROSSOURCEDIR%\." (
+    mkdir %_ROSSOURCEDIR%
+)
 
 ::
 :: Check if our log directory exists, if it doesn't, create it.

Modified: trunk/tools/RosBE-Windows/Root/SVN.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/SVN.cmd?rev=27390&r1=27389&r2=27390&view=diff
==============================================================================
--- trunk/tools/RosBE-Windows/Root/SVN.cmd (original)
+++ trunk/tools/RosBE-Windows/Root/SVN.cmd Wed Jul  4 20:26:39 2007
@@ -29,12 +29,23 @@
     %ROSBEBASEDIR%\Tools\svn.exe cleanup %_ROSSOURCEDIR%
     goto :ExitSVN
 )
+::
+:: Check if the Folder is empty. If not, output an error.
+::
+
 if "%1" == "create" (
     title Creating...
-    if not exist "%_ROSSOURCEDIR%\." (
-        mkdir %_ROSSOURCEDIR%
+    if exist "%_ROSSOURCEDIR%\.svn\." (
+        echo Folder already cotains a Reposority. Exiting
+        goto :ExitSVN
+    )
+    if exist "%_ROSSOURCEDIR%\*" (
+        echo Folder is not empty. Continuing is dangerous and can cause errors.
+        echo Press Strg+C to abort.
+        pause
         goto :SVN
     )
+    goto :SVN
 )
 if "%1" == "status" (
     title Status
@@ -55,20 +66,6 @@
     goto :ExitSVN
 )
 
-::
-:: Check if the Folder is empty. If not, output an error.
-::
-if exist "%_ROSSOURCEDIR%\.svn\." (
-    echo Folder already cotains a Reposority. Exiting
-    goto :ExitSVN
-)
-if exist "%_ROSSOURCEDIR%\*.*" (
-    echo Folder is not empty. Continuing is dangerous and can cause errors.
-    echo Press Strg+C to abort.
-    pause
-    goto :SVN
-)
-
 :SVN
 %ROSBEBASEDIR%\Tools\svn.exe checkout svn://svn.reactos.org/reactos/trunk/reactos %_ROSSOURCEDIR%
 goto :ExitSVN




More information about the Ros-diffs mailing list