ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cfmaps/cfupdate
(Generate patch)

Comparing cfmaps/cfupdate (file contents):
Revision 1.33 by root, Thu Oct 22 03:02:00 2009 UTC vs.
Revision 1.40 by root, Tue Oct 27 03:48:17 2009 UTC

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
20VERSION=2.022 20VERSION=2.033
21 21
22umask 022 22umask 022
23 23
24SRC=/root/src/cfmaps 24SRC=/root/src/cfmaps
25PATH="$SRC:$PATH" 25PATH="$SRC:$PATH"
26export BASE=${BASE:-/var/www/maps.deliantra.net} 26export BASE=${BASE:-/var/www/maps.deliantra.net}
27export DELIANTRA_LIBDIR=${DELIANTRA_LIBDIR:-$BASE/lib} 27export DELIANTRA_LIBDIR=${DELIANTRA_LIBDIR:-$BASE/lib}
28 28
29cd "$BASE" || exit 69 29cd "$BASE" || exit 69
30
31cvs -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
43chmod 644 "$SRC"/*.css 41chmod 644 "$SRC"/*.css
44cp "$SRC"/*.css . 42cp "$SRC"/*.css .
45chmod 755 "$SRC"/cfmapidx 43chmod 755 "$SRC"/cfmapidx
46cp "$SRC"/cfmapidx . 44cp "$SRC"/cfmapidx .
47 45
48find . "(" -name CVS -o -path ./a ")" -prune -o -type d -printf "%P/\n" | while read dir; do 46find . "(" -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
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 | *.html | *.html.gz | *.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>"
128 #gzip -7f index.xhtml 126 #gzip -7f index.xhtml
129 ) 127 )
130done 128done
131 129
132for dir in *; do 130for dir in *; do
133 if [ -e "$dir/$dir\_123_107.map" ]; then 131 if [ -e "$dir/${dir}_123_107.map" ]; then
134 echo "worldmap $dir"
135 cfworldmap "$dir" 132 cfworldmap "$dir"
136 fi 133 fi
137done 134done
138 135
139cfarch2html 136cfarch2html
140 137
141rm -f .index.dat~ 138rm -f .index.dat~
142<.cfmap2html xargs -l100 -P16 cfmap2html 139<.cfmap2html xargs -l100 cfmap2html
143<.cfmap2html xargs cfmapidx -a 140<.cfmap2html xargs -l200 cfmapidx -a
144mv .index.dat~ .index.dat 141mv .index.dat~ .index.dat
145 142
146#rm -f .cfmap2html 143#rm -f .cfmap2html
147 144
148chown -R root.root . 145chown -R root.root .

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines