#!/bin/sh
PYTHON="/usr/bin/python"
CONFIG="/tmp/blog.conf"
TITLE="むつのブログ"
URI="http://mutumin.ddo.jp/~taka/blog/slb/"
DESCRIPTION="テスト設置したブログです。本運用は致しません。"
TOP="/~taka/blog/slb/"
COPYRIGHT="2005 むつ."
MAIL="hogehoge@example.com"
PASSWD="password"
HURI=`echo -n $URI | sed -e "s|:|%3A|" -e "s|/|%2F|g"`
GURI=`echo -n $URI | sed -e "s|:|%3A|"`
PASSWD_MD5=`echo -n $PASSWD | md5sum | awk '{print $1}'`
if [ ! -d template ]; then
mkdir template
mv blog.cgi main.js blog.conf index.html template
fi
for i in blog.cgi main.js blog.conf index.html; do
echo "make $i..."
sed -e "s|/usr/local/bin/python|$PYTHON|g" \
-e "s|/virtual/fuktommy/private/blog.conf|$CONFIG|g" \
-e "s|00000000000000000000000000000000|$PASSWD_MD5|g" \
-e "s|http%3A%2F%2Fblog.fuktommy.com%2F|$HURI|g" \
-e "s|http%3A//blog.fuktommy.com/|$GURI|g" \
-e "s|http://blog.fuktommy.com/|$URI|g" \
-e "s|blog.fuktommy.com|$TITLE|g" \
-e "s|Ajaxを使った軽量のブログです。|$DESCRIPTION|g" \
-e "s|src=\"/somerights20.gif\"|src=\"${TOP}somerights20.gif\"|g" \
-e "s|href=\"/\"|href=\"$TOP\"|g" \
-e "s|href=\"/xml/rss\"|href=\"${TOP}xml/rss\"|g" \
-e "s|1998-2005 Fuktommy.|$COPYRIGHT|g" \
-e "s|webmaster@fuktommy.com|$MAIL|g" \
template/$i > $i
done
#xsl: /rss1.xsl
#
#action="/"