Index: nutchez-0.1/bin/nutchez
===================================================================
--- nutchez-0.1/bin/nutchez	(revision 66)
+++ nutchez-0.1/bin/nutchez	(revision 67)
@@ -8,8 +8,12 @@
 
 . ./nutchez-func.sh
+
 # root ?
 #check_if_root
 
 # show url lists
+
+setup_nutchez
+
 CHECK=0
 while [ $CHECK -eq 0 ]; do
Index: nutchez-0.1/bin/nutchez-func.sh
===================================================================
--- nutchez-0.1/bin/nutchez-func.sh	(revision 66)
+++ nutchez-0.1/bin/nutchez-func.sh	(revision 67)
@@ -5,13 +5,9 @@
 # .
 
-. $NUTCHEZ_SCRIPT_PATH/conf/hadoop-env.sh
-
-VERB=1
+. /etc/nutch/hadoop-env.sh || . $NUTCHEZ_SCRIPT_PATH/conf/hadoop-env.sh
 
 : ${DIALOG=dialog}
 
-#NEZ_DIR=/home/waue/.nutchez
-#NEZ_DIR_URL
-#NEZ_DIR_OTHER
+VERB=0
 
 
@@ -53,5 +49,16 @@
 }
 
+setup_nutchez() {
+  if ! [ -e ~/.nutchez ] ;then
+    cp -rf /etc/nutch/.nutchez ~/
+    chown -R $LOGNAME:$LOGNAME ~/.nutchez
+    if [ -e /tmp/nutch ] ;then
+      rm -rf /tmp/nutch
+    fi
+    mkdir /tmp/nutch
+    ln -sf ~/.nutchez/search /tmp/nutch/
 
+  fi
+}
 
 show_urls (){
@@ -98,5 +105,5 @@
   echo " \n 2. The robot name is : \n" >> $tempfile
   cat /tmp/n.robot.tmp >> $tempfile
-  echo " \n 3. The crawled dipth is : \n " >> $tempfile
+  echo " \n 3. The crawled depth is : \n " >> $tempfile
   cat /tmp/n.crawler.tmp >> $tempfile
   echo " \n 4. The explorer port is : \n " >> $tempfile
@@ -113,10 +120,19 @@
 }
 
+# define paramaters
+ROBOT=`cat /tmp/n.url.txt`
+URLS=`cat /tmp/n.url.txt`
+DEPTH=`cat /tmp/n.url.txt`
+PORT=`cat /tmp/n.url.txt`
+
 start_crawl () {
   echo_vb "7. start_crawl"
+  setup_nutch
+  /opt/nutch/bin/nutch crawl ~/.nutch/urls -dir ~/.nutch/search -threads 2 -depth $DEPTH 
 }
 
 start_tomcat () {
   echo_vb "8. start_tomcat "
+  /opt/nutch/tomcat/bin/startup.sh
 }
 
Index: nutchez-0.1/bin/test.sh
===================================================================
--- nutchez-0.1/bin/test.sh	(revision 66)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#!/bin/sh
-# $Id: inputbox4,v 1.3 2004/09/12 22:38:08 tom Exp $
-# An example which does not use temporary files, as suggested by Cary Evans:
-
-: ${DIALOG=dialog}
-$DIALOG --msgbox "goood" 0 0
-$DIALOG --msgbox "goood1" 0 0
-$DIALOG --msgbox "goood2" 0 0
-
-
-
-tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
-trap "rm -f $tempfile" 0 1 2 5 15
-
-$DIALOG --cr-wrap \
-	--title "INPUT BOX" --clear \
-        --inputbox \
-"Hi, this is an input dialog box. You can use
-this to ask questions that require the user
-to input a string as the answer. You can 
-input strings of length longer than the 
-width of the input box, in that case, the 
-input field will be automatically scrolled. 
-You can use BACKSPACE to correct errors. 
-
-Try entering your name below:" 0 0 2> $tempfile
-
-retval=$?
-
-case $retval in
-  0)
-    #echo "Input string is `cat $tempfile`"
-    $DIALOG --msgbox "Your message is `cat $tempfile`" 0 0
-    ;;
-  1)
-    echo "Cancel pressed.";;
-  255)
-    if test -s $tempfile ; then
-      cat $tempfile
-    else
-      echo "ESC pressed."
-    fi
-    ;;
-esac
Index: nutchez-0.1/build.xml
===================================================================
--- nutchez-0.1/build.xml	(revision 66)
+++ nutchez-0.1/build.xml	(revision 67)
@@ -14,5 +14,5 @@
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
- limitations under the License.
+ limitations under this License.
 -->
 <project name="Nutch" default="job">
Index: nutchez-0.1/conf/.nutchez/n.crawler.txt
===================================================================
--- nutchez-0.1/conf/.nutchez/n.crawler.txt	(revision 67)
+++ nutchez-0.1/conf/.nutchez/n.crawler.txt	(revision 67)
@@ -0,0 +1,1 @@
+6
Index: nutchez-0.1/conf/.nutchez/n.robot.txt
===================================================================
--- nutchez-0.1/conf/.nutchez/n.robot.txt	(revision 67)
+++ nutchez-0.1/conf/.nutchez/n.robot.txt	(revision 67)
@@ -0,0 +1,1 @@
+nutchez
Index: nutchez-0.1/conf/.nutchez/n.tomcat.txt
===================================================================
--- nutchez-0.1/conf/.nutchez/n.tomcat.txt	(revision 67)
+++ nutchez-0.1/conf/.nutchez/n.tomcat.txt	(revision 67)
@@ -0,0 +1,1 @@
+8081
Index: nutchez-0.1/conf/.nutchez/n.url.txt
===================================================================
--- nutchez-0.1/conf/.nutchez/n.url.txt	(revision 67)
+++ nutchez-0.1/conf/.nutchez/n.url.txt	(revision 67)
@@ -0,0 +1,2 @@
+http://www.nchc.org.tw
+http://www.yahoo.com.tw
Index: nutchez-0.1/debian/nutchez.install
===================================================================
--- nutchez-0.1/debian/nutchez.install	(revision 66)
+++ nutchez-0.1/debian/nutchez.install	(revision 67)
@@ -1,4 +1,5 @@
 conf/*		etc/nutch
 bin		opt/nutch
+bin/nutchez*	usr/local/sbin
 lib		opt/nutch
 webapps		opt/nutch
Index: nutchez-0.1/debian/nutchez.postrm
===================================================================
--- nutchez-0.1/debian/nutchez.postrm	(revision 66)
+++ nutchez-0.1/debian/nutchez.postrm	(revision 67)
@@ -17,4 +17,5 @@
     rm -rf /tmp/hadoop*
     rm -rf /tmp/hsperfdata*
+    rm /usr/local/sbin/nutchez*
   fi
 }
Index: nutchez-0.1/tomcat/webapps/ROOT/WEB-INF/classes/nutch-site.xml
===================================================================
--- nutchez-0.1/tomcat/webapps/ROOT/WEB-INF/classes/nutch-site.xml	(revision 66)
+++ nutchez-0.1/tomcat/webapps/ROOT/WEB-INF/classes/nutch-site.xml	(revision 67)
@@ -6,5 +6,5 @@
     <property>
         <name>searcher.dir</name>
-        <value>/opt/nutch/search</value>
+        <value>/tmp/nutch/search</value>
     </property>
 </configuration>
