Skip to content
This repository
Browse code

remove obsolete script

Signed-off-by: Christopher Hall <hsw@openmoko.com>
  • Loading branch information...
commit 12c7f387b30ca89ca97362d16dd8a99e82c5ba95 1 parent 533f02f
Christopher Hall authored

Showing 1 changed file with 0 additions and 166 deletions. Show diff stats Hide diff stats

  1. 166  01run.sh
166  01run.sh
... ...
@@ -1,166 +0,0 @@
1  
-#!/bin/bash
2  
-
3  
-xml="xml-file-samples/license.xml xml-file-samples/terms.xml eswiki-20091025-pages-meta-current.xml"
4  
-
5  
-
6  
-ERROR()
7  
-{
8  
-  echo error: $*
9  
-  exit 1
10  
-}
11  
-
12  
-USAGE()
13  
-{
14  
-  [ -z "$1" ] || echo error: $*
15  
-  echo usage: $(basename "$0") '<options>' command
16  
-  echo '       --help         -h         this message'
17  
-  echo '       --verbose      -v         more messages'
18  
-  echo '       --get-index=n  -g <n>     where to rsync the pickles from [1 => render1]'
19  
-  echo '       --host=name    -o <name>  name of the host [render]'
20  
-  echo '       --index-only   -i         only do the index'
21  
-  echo '       --no-run       -n         do not run final make'
22  
-  echo '       --sequential   -s         run rensering in series'
23  
-  echo '       --clear        -c         clear work and dest dirs'
24  
-  echo '       --work=dir     -w <dir>   workdir [work]'
25  
-  echo '       --dest=dir     -d <dir>   destdir [image]'
26  
-  exit 1
27  
-}
28  
-
29  
-
30  
-verbose=no
31  
-host=render
32  
-index=
33  
-clear=no
34  
-work=work
35  
-dest=image
36  
-run=yes
37  
-seq=no
38  
-IndexOnly=no
39  
-debug=
40  
-
41  
-args=$(getopt -o hvg:o:p:inscw:d: --long=help,verbose,get-index:,host:,index-only,no-run,sequential,clear,work:,dest:,debug -- "$@") ||exit 1
42  
-# replace the arguments with the parsed values
43  
-eval set -- "${args}"
44  
-
45  
-while :
46  
-do
47  
-  case "$1" in
48  
-    -v|--verbose)
49  
-      verbose=yes
50  
-      shift
51  
-      ;;
52  
-
53  
-    -g|--get-index)
54  
-      index=$2
55  
-      shift 2
56  
-      ;;
57  
-
58  
-    -o|--host)
59  
-      host=$2
60  
-      shift 2
61  
-      ;;
62  
-
63  
-    -i|--index-only)
64  
-      IndexOnly=yes
65  
-      shift
66  
-      ;;
67  
-
68  
-    -n|--no-run)
69  
-      run=no
70  
-      shift
71  
-      ;;
72  
-
73  
-    -s|--sequential)
74  
-      seq=yes
75  
-      shift
76  
-      ;;
77  
-
78  
-    -c|--clear)
79  
-      clear=yes
80  
-      shift
81  
-      ;;
82  
-
83  
-    -w|--work)
84  
-      work=$2
85  
-      shift 2
86  
-      ;;
87  
-
88  
-    -d|--dest)
89  
-      dest=$2
90  
-      shift 2
91  
-      ;;
92  
-
93  
-    --debug)
94  
-      debug=echo
95  
-      shift
96  
-      ;;
97  
-
98  
-    --)
99  
-      shift
100  
-      break
101  
-      ;;
102  
-
103  
-    -h|--help)
104  
-      USAGE
105  
-      ;;
106  
-
107  
-    *)
108  
-      USAGE invalid option: $1
109  
-      ;;
110  
-  esac
111  
-done
112  
-
113  
-this_host=$(hostname --short)
114  
-this_id=${this_host##${host}}
115  
-[ X"${this_id}" = X"${this_host}" ] && this_id=0
116  
-
117  
-farm="farm${this_id}"
118  
-
119  
-eval ${debug} "mkdir -p '${work}'"
120  
-eval ${debug} "mkdir -p '${dest}'"
121  
-
122  
-case "${clear}" in
123  
-  [yY]|[yY][eE][sS])
124  
-    eval ${debug} "time make clean-index DESTDIR='${dest}' WORKDIR='${work}' XML_FILES='${xml}'"
125  
-    eval ${debug} "time make '${farm}-clean' DESTDIR='${dest}' WORKDIR='${work}' XML_FILES='${xml}'"
126  
-    eval ${debug} "rm -f '${work}'/* '${dest}'/*"
127  
-    ;;
128  
-esac
129  
-
130  
-# update
131  
-git pull --rebase
132  
-
133  
-# copy the index from another machine
134  
-if [ -n "${index}" ]
135  
-then
136  
-  list='articles.db offsets.db counts.text'
137  
-  items=
138  
-  for i in ${list}
139  
-  do
140  
-    items="${items} ${host}${index}:samo/${work}/${i}"
141  
-  done
142  
-  eval ${debug} "rsync -avHx --progress ${items} '${work}'/"
143  
-  eval ${debug} "touch stamp-r-index"
144  
-fi
145  
-
146  
-# run the build
147  
-case "${run}" in
148  
-  [yY]|[yY][eE][sS])
149  
-
150  
-    eval ${debug} "time make 'stamp-r-index' DESTDIR='${dest}' WORKDIR='${work}' XML_FILES='${xml}'"
151  
-
152  
-    case "${IndexOnly}" in
153  
-      [yY]|[yY][eE][sS])
154  
-        ;;
155  
-      *)
156  
-        case "${seq}" in
157  
-          [yY]|[yY][eE][sS])
158  
-            eval ${debug} "time make -j3 '${farm}-parse' DESTDIR='${dest}' WORKDIR='${work}' XML_FILES='${xml}'"
159  
-            eval ${debug} "time make '${farm}-render' DESTDIR='${dest}' WORKDIR='${work}' XML_FILES='${xml}'"
160  
-            ;;
161  
-          *)
162  
-            eval ${debug} "time make -j3 '${farm}' DESTDIR='${dest}' WORKDIR='${work}' XML_FILES='${xml}'"
163  
-            ;;
164  
-        esac
165  
-    esac
166  
-esac

0 notes on commit 12c7f38

Please sign in to comment.
Something went wrong with that request. Please try again.