… | |
… | |
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.032 |
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" |
… | |
… | |
73 | elif [ -f "$file" ]; then |
73 | elif [ -f "$file" ]; then |
74 | case "$file" in |
74 | case "$file" in |
75 | cfmapidx | *.jpg | *.png | *.html | *.html.gz | *.xhtml | *.xhtml.gz | *.css | *.err | *~ ) |
75 | cfmapidx | *.jpg | *.png | *.html | *.html.gz | *.xhtml | *.xhtml.gz | *.css | *.err | *~ ) |
76 | ;; |
76 | ;; |
77 | *.map ) |
77 | *.map ) |
78 | echo >&7 "<li><a href='${file%.map}.xhtml'>${file%.map}</a> [map]</li>" |
78 | echo >&7 "<li><a href='${file%.map}.xhtml'>${file%.map}</a> [map] <img class='mapthumb' src='${file%.map}.jpg' /></li>" |
79 | DIR="${dir#/}" |
79 | DIR="${dir#/}" |
80 | echo "$DIR$file" >>$BASE/.cfmap2html |
80 | echo "$DIR$file" >>$BASE/.cfmap2html |
81 | ;; |
81 | ;; |
82 | * ) |
82 | * ) |
83 | # non-deliantra compatibility |
83 | # non-deliantra compatibility |
84 | if [ "$(head -1 "$file")" = "arch map" ]; then |
84 | if [ "$(head -1 "$file")" = "arch map" ]; then |
85 | echo >&7 "<li><a href='$file.xhtml'>$file</a> [map]</li>" |
85 | echo >&7 "<li><a href='$file.xhtml'>$file</a> [map] <img class='mapthumb' src='$file.jpg' /></li>" |
86 | ln -sf "$file" "$file.map" |
86 | ln -sf "$file" "$file.map" |
87 | DIR="${dir#/}" |
87 | DIR="${dir#/}" |
88 | echo "$DIR$file.map" >>$BASE/.cfmap2html |
88 | echo "$DIR$file.map" >>$BASE/.cfmap2html |
89 | else |
89 | else |
90 | echo >&7 "<li><a href='$file'>$file</a> [file]</li>" |
90 | echo >&7 "<li><a href='$file'>$file</a> [file]</li>" |
… | |
… | |
135 | fi |
135 | fi |
136 | done |
136 | done |
137 | |
137 | |
138 | cfarch2html |
138 | cfarch2html |
139 | |
139 | |
140 | rm -f .index.dat~.* |
140 | rm -f .index.dat~ |
141 | <.cfmap2html xargs -l50 cfmap2html |
141 | <.cfmap2html xargs -l50 cfmap2html |
142 | <.cfmap2html xargs cfmapidx -a |
142 | <.cfmap2html xargs cfmapidx -a |
143 | mv .index.dat~.dir .index.dat.dir |
143 | mv .index.dat~ .index.dat |
144 | mv .index.dat~.pag .index.dat.pag |
|
|
145 | |
144 | |
146 | #rm -f .cfmap2html |
145 | #rm -f .cfmap2html |
147 | |
146 | |
148 | chown -R root.root . |
147 | chown -R root.root . |
149 | chmod -R u=rwX,go=rX . |
148 | chmod -R u=rwX,go=rX . |