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

Comparing cfmaps/cfupdate (file contents):
Revision 1.34 by root, Thu Oct 22 03:04:34 2009 UTC vs.
Revision 1.41 by root, Sat Oct 31 17:26:44 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
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>"
136done 134done
137 135
138cfarch2html 136cfarch2html
139 137
140rm -f .index.dat~ 138rm -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
141cfmapidx -a -r # reorganise
143mv .index.dat~ .index.dat 142mv .index.dat~ .index.dat
144 143
145#rm -f .cfmap2html 144#rm -f .cfmap2html
146 145
147chown -R root.root . 146chown -R root.root .

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines