source: nutchez-0.1/bin/nutchez @ 68

Last change on this file since 68 was 68, checked in by waue, 15 years ago

big modification

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/bash
2# Author: WeiYu Chen <waue _at_ nchc org tw>
3# License: GPL
4# Description: Eazily use for Nutch
5# .
6export NUTCH_CONF_DIR=~/.nutchez
7NUTCHEZ_SCRIPT_PATH="${NUTCHEZ_SCRIPT_PATH:-/opt/nutch}"
8
9. ./nutchez-func.sh
10
11
12# root ?
13#check_if_root
14
15# show url lists
16
17setup_nutchez
18
19CHECK=0
20while [ $CHECK -eq 0 ]; do
21
22  LOCK=1
23  while [ $LOCK -eq 1 ]; do
24    # milestone M1
25    show_urls
26    URL=$?
27    echo_vb "2.2 show_urls return $URL"
28   
29# add or delete url:  ok , exit
30# ok =0 , exit =1
31
32    if [ $URL -eq 0 ];then
33      # go_to_M2
34      LOCK=0
35    else
36      #return_console
37      exit
38    fi
39
40  done
41  # milestone M2
42
43  # setup search engine personality
44  #   next, back
45  setup_robot
46
47  # setup the crawl paramater
48  #   next, back
49  setup_crawler
50
51  # setup the tomcat paramater
52  #   next, back
53  setup_tomcat
54
55  # show the final checklist
56  final_confirm
57  FC=$?
58  echo_vb "6.3 final confirm return = $FC "
59  #   START , back, cancel
60  # start =0 , back =1
61  if [ $FC -eq 0 ];then
62    #go_to_M3
63    CHECK=1
64    # change temp file as conf file
65    promote_tempfile
66  else
67    #go_to_M1
68    LOCK=1
69    CHECK=0
70    # temp file delete!
71    clean_tempfile
72    #return_console
73  fi
74done
75
76start_crawl
77
78start_tomcat
79
80# show result message
81
82show_report
83
84# Done
85
Note: See TracBrowser for help on using the repository browser.