You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by th...@apache.org on 2008/10/02 00:52:24 UTC

svn commit: r700966 - in /labs/droids/branch/LABS-144: bin/ bin/droids src/documentation/content/xdocs/install.xml tools/ant/

Author: thorsten
Date: Wed Oct  1 15:52:24 2008
New Revision: 700966

URL: http://svn.apache.org/viewvc?rev=700966&view=rev
Log:
LABS-189
Adding shell script and our own ant both based on forrest.
Adding paragraph about setting the environment variables.

Added:
    labs/droids/branch/LABS-144/bin/
    labs/droids/branch/LABS-144/bin/droids
      - copied, changed from r700947, forrest/trunk/bin/forrest
    labs/droids/branch/LABS-144/tools/ant/
      - copied from r700948, forrest/trunk/tools/ant/
Modified:
    labs/droids/branch/LABS-144/src/documentation/content/xdocs/install.xml

Copied: labs/droids/branch/LABS-144/bin/droids (from r700947, forrest/trunk/bin/forrest)
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/bin/droids?p2=labs/droids/branch/LABS-144/bin/droids&p1=forrest/trunk/bin/forrest&r1=700947&r2=700966&rev=700966&view=diff
==============================================================================
--- forrest/trunk/bin/forrest (original)
+++ labs/droids/branch/LABS-144/bin/droids Wed Oct  1 15:52:24 2008
@@ -35,8 +35,8 @@
   PROJECT_HOME=`pwd`
 fi
 
-if [ -z "$FORREST_HOME" ] ; then
-  # use the location of this script to infer $FORREST_HOME
+if [ -z "$DROIDS_HOME" ] ; then
+  # use the location of this script to infer $DROIDS_HOME
 
   thisprg="$0"
 
@@ -53,38 +53,38 @@
     fi
   done
 
-  FORREST_HOME=`dirname "$thisprg"`/..
+  DROIDS_HOME=`dirname "$thisprg"`/..
 
   # Make it fully qualified
 
-  FORREST_HOME=`cd "$FORREST_HOME" && pwd`
+  DROIDS_HOME=`cd "$DROIDS_HOME" && pwd`
 fi
 
 # Save old ANT_HOME
 OLD_ANT_HOME="$ANT_HOME"
 unset ANT_HOME
-ANT_HOME="$FORREST_HOME/tools/ant"
+ANT_HOME="$DROIDS_HOME/tools/ant"
 
 # ----- Set Up The Runtime Classpath ------------------------------------------
 
 if [ "$cygwin" = "true" ] ; then
   S=';'
-  FORREST_DOT_HOME=`cygpath -w "$FORREST_HOME"`
-  FORREST_SHELL_HOME=`cygpath -u "$FORREST_HOME"`
+  DROIDS_DOT_HOME=`cygpath -w "$DROIDS_HOME"`
+  DROIDS_SHELL_HOME=`cygpath -u "$DROIDS_HOME"`
 else
   S=':'
-  FORREST_DOT_HOME=$FORREST_HOME
-  FORREST_SHELL_HOME=$FORREST_HOME
+  DROIDS_DOT_HOME=$DROIDS_HOME
+  DROIDS_SHELL_HOME=$DROIDS_HOME
 fi
 
 # set the ant file to use
-ANTFILE="$FORREST_DOT_HOME/main/forrest.build.xml"
+ANTFILE="$DROIDS_DOT_HOME/build.xml"
 
 CP="$CLASSPATH"
 export CP
 unset CLASSPATH
 
-for i in $FORREST_SHELL_HOME/lib/endorsed/*.jar; do
+for i in $DROIDS_SHELL_HOME/lib/endorsed/*.jar; do
   if [ "$cygwin" = "true" ] ; then
     LIB=`cygpath -w $i`
   else
@@ -96,9 +96,9 @@
 
 export CLASSPATH
 
-echo "Apache Forrest.  Run 'forrest -projecthelp' to list options"
+echo "Apache Droids.  Run 'droids -projecthelp' to list options"
 echo
-export FORREST_HOME
+export DROIDS_HOME
 "$ANT_HOME/bin/ant" --noconfig -buildfile "$ANTFILE" -Dbasedir="$PROJECT_HOME" -emacs "$@"
 RESULT=$?
 

Modified: labs/droids/branch/LABS-144/src/documentation/content/xdocs/install.xml
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/src/documentation/content/xdocs/install.xml?rev=700966&r1=700965&r2=700966&view=diff
==============================================================================
--- labs/droids/branch/LABS-144/src/documentation/content/xdocs/install.xml (original)
+++ labs/droids/branch/LABS-144/src/documentation/content/xdocs/install.xml Wed Oct  1 15:52:24 2008
@@ -27,6 +27,75 @@
         $DROIDS_HOME):</p>
       <source>svn co https://svn.apache.org/repos/asf/labs/droids/trunk droids</source>
     </section>
+    <section>
+        <title>Setting up the Environment</title>
+        <p>
+          After downloading and extracting Droids, you need to add environment
+          variables. The reason for this is so that the 'droids' command is
+          available everywhere and it can locate its home directory and
+          resources. It is beyond the scope of Droids to explain how to manage
+          your operating system. 
+        </p>
+        <section>
+          <title>In Unix/Linux:</title>
+          <p class="instruction">
+            change directory to the top-level of the droids distribution and do
+            ...
+          </p>
+          <p class="instruction">
+            ~/apache-droids$ export DROIDS_HOME=`pwd`
+          </p>
+          <p class="instruction">
+            ~/apache-droids$ export PATH=$PATH:$DROIDS_HOME/bin
+          </p>
+          <section>
+            <title>Permanently Setting The Environment Variables for Linux/Unix</title>
+            <p>
+              Export only changes the variables during that terminal session for
+              that user, this is useful for testing. To permanently add the
+              variable edit either <code>/etc/bash.bashrc</code> (for all users)
+              or <code>~/.bash_profile</code> or <code>~/.bashrc</code> (for individual users). Add these
+              lines to the end of the file you edit:
+            </p>
+            <source>
+      DROIDS_HOME=/full/path/to/droids
+      export DROIDS_HOME
+      
+      PATH=$PATH:$DROIDS_HOME/bin
+      export PATH
+          </source>
+  </section>
+        </section>
+        <section>
+          <title>Windows 2000</title>
+          <p class="instruction">
+            Go to "My Computer", "Properties", "Advanced", "Environment
+            Variables"
+          </p>
+          <p class="instruction">
+            add a new variable <code>DROIDS_HOME</code> as
+            <code>C:\full\path\to\apache-droids</code>
+          </p>
+          <p class="instruction">
+            edit <code>PATH</code> as <code>%PATH%;%DROIDS_HOME%\bin</code>
+          </p>
+        </section>
+        <section>
+          <title>In Windows XP:</title>
+          <p class="instruction">
+            Go to "My Computer", "Properties", "Advanced", "Environment
+            Variables"
+          </p>
+          <p class="instruction">
+            Create a New variable with name: DROIDS_HOME value:
+            C:\full\path\to\apache-droids
+          </p>
+          <p class="instruction">
+            Edit PATH by adding ;%DROIDS_HOME%\bin to the end of the current
+            value.
+          </p>
+        </section>
+      </section>
     <section id="Build">
       <title>Build</title>
       <p>Before building droids, create a file called build.properties to customize your Droid. 
@@ -39,10 +108,10 @@
 droids.name=hello
         
 # the regular expression file we want to use
-droids.filter.regex=${basedir}/regex-urlfilter.txt
+droids.filter.regex=${droids.home}/regex-urlfilter.txt
         
 # the root output dir for saving a crawl
-droids.handler.save.dir=${basedir}/export/]]></source>
+droids.handler.save.dir=${droids.home}/export/]]></source>
       <p>
         <strong>After</strong> you create the above file you can go ahead and build droids
         like follows. The command will first download all libaries that we need with the help



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org