… | |
… | |
15 | # |
15 | # |
16 | # You should have received a copy of the GNU General Public License |
16 | # You should have received a copy of the GNU General Public License |
17 | # along with cfmaps; if not, write to the Free Software |
17 | # along with cfmaps; if not, write to the Free Software |
18 | # Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
18 | # Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
19 | |
19 | |
20 | VERSION=2.022 |
20 | VERSION=2.033 |
21 | |
21 | |
22 | umask 022 |
22 | umask 022 |
23 | |
23 | |
24 | SRC=/root/src/cfmaps |
24 | SRC=/root/src/cfmaps |
25 | PATH="$SRC:$PATH" |
25 | PATH="$SRC:$PATH" |
26 | export BASE=${BASE:-/var/www/maps.deliantra.net} |
26 | export BASE=${BASE:-/var/www/maps.deliantra.net} |
27 | export DELIANTRA_LIBDIR=${DELIANTRA_LIBDIR:-$BASE/lib} |
27 | export DELIANTRA_LIBDIR=${DELIANTRA_LIBDIR:-$BASE/lib} |
28 | |
28 | |
29 | cd "$BASE" || exit 69 |
29 | cd "$BASE" || exit 69 |
30 | |
|
|
31 | cvs -Q -z3 update -AdP | grep -v ^\\? |
|
|
32 | |
30 | |
33 | #wget -qm --no-check-certificate https://cat2.dynu.ca/cat2/mlab-devel.tar.gz |
31 | #wget -qm --no-check-certificate https://cat2.dynu.ca/cat2/mlab-devel.tar.gz |
34 | #if [ cat2.dynu.ca/cat2/mlab-devel.tar.gz -nt cat2.dynu.ca/cat2/mlab-devel.tar.gz~ ]; then |
32 | #if [ cat2.dynu.ca/cat2/mlab-devel.tar.gz -nt cat2.dynu.ca/cat2/mlab-devel.tar.gz~ ]; then |
35 | # tar xzpf cat2.dynu.ca/cat2/mlab-devel.tar.gz |
33 | # tar xzpf cat2.dynu.ca/cat2/mlab-devel.tar.gz |
36 | # chown -R root.root mlab-devel |
34 | # chown -R root.root mlab-devel |
… | |
… | |
43 | chmod 644 "$SRC"/*.css |
41 | chmod 644 "$SRC"/*.css |
44 | cp "$SRC"/*.css . |
42 | cp "$SRC"/*.css . |
45 | chmod 755 "$SRC"/cfmapidx |
43 | chmod 755 "$SRC"/cfmapidx |
46 | cp "$SRC"/cfmapidx . |
44 | cp "$SRC"/cfmapidx . |
47 | |
45 | |
48 | find . "(" -name CVS -o -path ./a ")" -prune -o -type d -printf "%P/\n" | while read dir; do |
46 | find . "(" -name CVS -o -path ./a -o -name .svn ")" -prune -o -type d -printf "%P/\n" | while read dir; do |
49 | ( |
47 | ( |
50 | export dir |
48 | export dir |
51 | cd "./$dir" || exit 68 |
49 | cd "./$dir" || exit 68 |
52 | { |
50 | { |
53 | cat >&7 <<-EOF |
51 | cat >&7 <<-EOF |
… | |
… | |
70 | for file in *; do |
68 | for file in *; do |
71 | if [ -h "$file" ]; then |
69 | if [ -h "$file" ]; then |
72 | : # ignore for now |
70 | : # ignore for now |
73 | elif [ -f "$file" ]; then |
71 | elif [ -f "$file" ]; then |
74 | case "$file" in |
72 | case "$file" in |
75 | cfmapidx | *.jpg | *.png | *.html | *.html.gz | *.xhtml | *.xhtml.gz | *.css | *.err | *~ ) |
73 | cfmapidx | *.jpg | *.png | *.xhtml | *.xhtml.gz | *.css | *.err | *~ ) |
76 | ;; |
74 | ;; |
77 | *.map ) |
75 | *.map ) |
78 | echo >&7 "<li><a href='${file%.map}.xhtml'>${file%.map}</a> [map]</li>" |
76 | echo >&7 "<li><a href='${file%.map}.xhtml'>${file%.map}</a> [map] <img class='mapthumb' src='${file%.map}.jpg' /></li>" |
79 | DIR="${dir#/}" |
77 | DIR="${dir#/}" |
80 | echo "$DIR$file" >>$BASE/.cfmap2html |
78 | echo "$DIR$file" >>$BASE/.cfmap2html |
81 | ;; |
79 | ;; |
82 | * ) |
80 | * ) |
83 | # non-deliantra compatibility |
81 | # non-deliantra compatibility |
84 | if [ "$(head -1 "$file")" = "arch map" ]; then |
82 | if [ "$(head -1 "$file")" = "arch map" ]; then |
85 | echo >&7 "<li><a href='$file.xhtml'>$file</a> [map]</li>" |
83 | echo >&7 "<li><a href='$file.xhtml'>$file</a> [map] <img class='mapthumb' src='$file.jpg' /></li>" |
86 | ln -sf "$file" "$file.map" |
84 | ln -sf "$file" "$file.map" |
87 | DIR="${dir#/}" |
85 | DIR="${dir#/}" |
88 | echo "$DIR$file.map" >>$BASE/.cfmap2html |
86 | echo "$DIR$file.map" >>$BASE/.cfmap2html |
89 | else |
87 | else |
90 | echo >&7 "<li><a href='$file'>$file</a> [file]</li>" |
88 | echo >&7 "<li><a href='$file'>$file</a> [file]</li>" |
… | |
… | |
136 | done |
134 | done |
137 | |
135 | |
138 | cfarch2html |
136 | cfarch2html |
139 | |
137 | |
140 | rm -f .index.dat~ |
138 | rm -f .index.dat~ |
141 | <.cfmap2html xargs -l100 -P16 cfmap2html |
139 | <.cfmap2html xargs -l90 cfmap2html |
142 | <.cfmap2html xargs cfmapidx -a |
140 | <.cfmap2html xargs -l50 cfmapidx -a |
|
|
141 | cfmapidx -a -r # reorganise |
143 | mv .index.dat~ .index.dat |
142 | mv .index.dat~ .index.dat |
144 | |
143 | |
145 | #rm -f .cfmap2html |
144 | #rm -f .cfmap2html |
146 | |
145 | |
147 | chown -R root.root . |
146 | chown -R root.root . |