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