--- cfmaps/cfupdate 2008/01/06 21:12:00 1.30
+++ cfmaps/cfupdate 2009/10/23 05:01:02 1.38
@@ -17,14 +17,14 @@
# along with cfmaps; if not, write to the Free Software
# Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-VERSION=2.001
+VERSION=2.032
umask 022
SRC=/root/src/cfmaps
PATH="$SRC:$PATH"
-BASE="/var/www/maps.deliantra.net"
-export CROSSFIRE_LIBDIR="$BASE"/lib
+export BASE=${BASE:-/var/www/maps.deliantra.net}
+export DELIANTRA_LIBDIR=${DELIANTRA_LIBDIR:-$BASE/lib}
cd "$BASE" || exit 69
@@ -52,7 +52,7 @@
{
cat >&7 <<-EOF
-
+
Deliantra Maps Directory "$dir"
@@ -60,25 +60,35 @@
Keyword Search Over All Maps
-
+
Deliantra Maps Directory "$dir"
This Directory
EOF
for file in *; do
- if [ -f "$file" ]; then
+ if [ -h "$file" ]; then
+ : # ignore for now
+ elif [ -f "$file" ]; then
case "$file" in
- cfmapidx | *.jpg | *.png | *.html | *.html.gz | *.xhtml | *.xhtml.gz | *.css | *~ )
+ cfmapidx | *.jpg | *.png | *.html | *.html.gz | *.xhtml | *.xhtml.gz | *.css | *.err | *~ )
;;
*.map )
- echo >&7 "- ${file%.map} [map]
"
+ echo >&7 "- ${file%.map} [map]
![](${file%.map}.jpg)
"
DIR="${dir#/}"
echo "$DIR$file" >>$BASE/.cfmap2html
;;
* )
- echo >&7 "- $file [file]
"
+ # non-deliantra compatibility
+ if [ "$(head -1 "$file")" = "arch map" ]; then
+ echo >&7 "- $file [map]
![]($file.jpg)
"
+ ln -sf "$file" "$file.map"
+ DIR="${dir#/}"
+ echo "$DIR$file.map" >>$BASE/.cfmap2html
+ else
+ echo >&7 "- $file [file]
"
+ fi
;;
esac
elif [ -d "$file" ]; then
@@ -119,9 +129,13 @@
)
done
+for dir in *; do
+ if [ -e "$dir/${dir}_123_107.map" ]; then
+ cfworldmap "$dir"
+ fi
+done
+
cfarch2html
-cfworldmap world
-cfworldmap world-precomposed
rm -f .index.dat~
<.cfmap2html xargs -l50 cfmap2html