Last change
on this file since 75 was
75,
checked in by waue, 15 years ago
|
promote
|
-
Property svn:executable set to
*
|
File size:
1.5 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 | |
---|
7 | # begining .. |
---|
8 | |
---|
9 | #bin=`dirname "$0"` |
---|
10 | #bin=`cd "$bin"; pwd` |
---|
11 | |
---|
12 | #. "$bin"/nutchez-func.sh |
---|
13 | |
---|
14 | export NUTCH_CONF_DIR=~/.nutchez |
---|
15 | export HADOOP_CONF_DIR=~/.nutchez |
---|
16 | export NUTCH_LOG_DIR=~/.nutchez/log |
---|
17 | # export NUTCH_HOME=/opt/nutch |
---|
18 | |
---|
19 | . /opt/nutch/bin/nutchez-func.sh |
---|
20 | . ~/.nutchez/hadoop-env.sh |
---|
21 | |
---|
22 | |
---|
23 | |
---|
24 | init_nutchez |
---|
25 | |
---|
26 | CHECK=0 |
---|
27 | while [ $CHECK -eq 0 ]; do |
---|
28 | |
---|
29 | LOCK=1 |
---|
30 | while [ $LOCK -eq 1 ]; do |
---|
31 | # milestone M1 |
---|
32 | show_urls |
---|
33 | URL=$? |
---|
34 | echo_vb "2.2 show_urls return $URL" |
---|
35 | |
---|
36 | # add or delete url: ok , exit |
---|
37 | # ok =0 , exit =1 |
---|
38 | |
---|
39 | if [ $URL -eq 0 ];then |
---|
40 | # go_to_M2 |
---|
41 | LOCK=0 |
---|
42 | else |
---|
43 | #return_console |
---|
44 | exit |
---|
45 | fi |
---|
46 | |
---|
47 | done |
---|
48 | # milestone M2 |
---|
49 | |
---|
50 | # setup search engine personality |
---|
51 | # next, back |
---|
52 | setup_robot |
---|
53 | |
---|
54 | # setup the crawl paramater |
---|
55 | # next, back |
---|
56 | setup_crawler |
---|
57 | |
---|
58 | # setup the tomcat paramater |
---|
59 | # next, back |
---|
60 | setup_tomcat |
---|
61 | |
---|
62 | # show the final checklist |
---|
63 | final_confirm |
---|
64 | FC=$? |
---|
65 | echo_vb "6.3 final confirm return = $FC " |
---|
66 | # START , back, cancel |
---|
67 | # start =0 , back =1 |
---|
68 | #if [ $FC -eq 0 ];then |
---|
69 | case $FC in |
---|
70 | 0) |
---|
71 | #go_to_M3 |
---|
72 | CHECK=1 |
---|
73 | # change temp file as conf file |
---|
74 | promote_tempfile |
---|
75 | ;; |
---|
76 | #else |
---|
77 | 1) |
---|
78 | exit |
---|
79 | ;; |
---|
80 | 3) |
---|
81 | #go_to_M1 |
---|
82 | LOCK=1 |
---|
83 | CHECK=0 |
---|
84 | # temp file delete! |
---|
85 | clean_tempfile |
---|
86 | #return_console |
---|
87 | ;; |
---|
88 | 255) |
---|
89 | echo_vb "ESC pressed !!" |
---|
90 | ;; |
---|
91 | esac |
---|
92 | #fi |
---|
93 | done |
---|
94 | |
---|
95 | start_crawl |
---|
96 | |
---|
97 | #start_tomcat |
---|
98 | |
---|
99 | # show result message |
---|
100 | |
---|
101 | #show_report |
---|
102 | |
---|
103 | # Done |
---|
104 | |
---|
Note: See
TracBrowser
for help on using the repository browser.