source: nutchez-0.1/bin/nutchez @ 67

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

v2

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