bump version in install.rdf so that SeaMonkey 2.1a1pre can actually use the themes
[themes.git] / origdiff
CommitLineData
39d844b6
RK
1#!/bin/sh
2
39d844b6
RK
3RUN_DIR=$(pwd)
4cd $(dirname "$0")
5SCRIPT_DIR=$(pwd)
6
7fc9ff7c
RK
7REPO_LIST="COMM MOZ DOMI CZ"
8
39d844b6
RK
9if [ -n "$1" ]; then
10 SRC_DATE="$1"
362ae058 11 DST_DATE=`TZ=America/Los_Angeles date +%Y-%m-%d`
690b7d1f 12
6ae9fd60 13 HG_COMM_DIR=/mnt/mozilla/hg/comm-central
5aa0264d 14 COMM_HG_OPTIONS=
39d844b6 15 COMM_DIR=suite/themes/classic/
860fec43 16 COMM_LOG=$RUN_DIR/themelog-suitedefault.$SRC_DATE.$DST_DATE.log
690b7d1f 17
6ae9fd60 18 HG_MOZ_DIR=/mnt/mozilla/hg/comm-central/mozilla
5aa0264d 19 MOZ_HG_OPTIONS=
690b7d1f 20 MOZ_DIR=toolkit/themes/winstripe/
860fec43 21 MOZ_LOG=$RUN_DIR/themelog-tkwinstripe.$SRC_DATE.$DST_DATE.log
39d844b6 22
6ae9fd60 23 HG_DOMI_DIR=/mnt/mozilla/hg/comm-central/mozilla/extensions/inspector
5aa0264d 24 DOMI_HG_OPTIONS=
690b7d1f
RK
25 DOMI_DIR=resources/skin/classic/
26 DOMI_LOG=$RUN_DIR/themelog-domiclassic.$SRC_DATE.$DST_DATE.log
27
6ae9fd60 28 HG_CZ_DIR=/mnt/mozilla/hg/comm-central/mozilla/extensions/irc
5aa0264d 29 CZ_HG_OPTIONS=
40f781fe
RK
30 CZ_DIR=xul/skin/
31 CZ_LOG=$RUN_DIR/themelog-chatzilla.$SRC_DATE.$DST_DATE.log
32
7fc9ff7c 33 for repo in $REPO_LIST; do
40f781fe
RK
34 HG_DIR_VAR="HG_${repo}_DIR"
35 HG_DIR=${!HG_DIR_VAR}
5aa0264d
RK
36 HG_OPTIONS_VAR="${repo}_HG_OPTIONS"
37 HG_OPTIONS=${!HG_OPTIONS_VAR}
40f781fe
RK
38 SKIN_DIR_VAR="${repo}_DIR"
39 SKIN_DIR=${!SKIN_DIR_VAR}
40 LOG_VAR="${repo}_LOG"
41 LOG_NAME=${!LOG_VAR}
42 if [ ! -e $LOG_NAME ]; then
43 echo "Getting $LOG_NAME..."
44 cd $HG_DIR
5aa0264d 45 LC_ALL=C hg log -d ">$SRC_DATE" $HG_OPTIONS $SKIN_DIR > $LOG_NAME
40f781fe
RK
46 fi
47 done
39d844b6
RK
48 cd $RUN_DIR
49else
50 echo "You must specify a start date."
51 exit 1
52fi
53
7fc9ff7c 54for repo in $REPO_LIST; do
39d844b6
RK
55 HG_DIR_VAR="HG_${repo}_DIR"
56 LOG_VAR="${repo}_LOG"
57 HG_URL=`awk -F ' *= *' '/default *=/ { print $2 }' ${!HG_DIR_VAR}/.hg/hgrc`
58 REPO_NAME=`basename $HG_URL`
860fec43 59 LOG_NAME=${!LOG_VAR}
690b7d1f 60 HTML_NAME=${LOG_NAME/.log/.html}
39d844b6
RK
61 echo "Writing $HTML_NAME..."
62 echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' > $HTML_NAME
63 echo "<html>" >> $HTML_NAME
64 echo " <head>" >> $HTML_NAME
65 echo " <title>$REPO_NAME Theme Changes</title>" >> $HTML_NAME
66 echo " </head>" >> $HTML_NAME
67 echo " <body>" >> $HTML_NAME
68 echo " <h1>$REPO_NAME Theme Changes</h1>" >> $HTML_NAME
69 echo " <h2>$SRC_DATE to $DST_DATE</h2>" >> $HTML_NAME
70 echo " <pre>" >> $HTML_NAME
362ae058 71 sed -e "s/&/\&amp;/g" -e "s/</\&lt;/g" -e "s/>/\&gt;/g" \
39d844b6 72 -e "s|\(changeset: *[0-9]*\):\([0-9a-f]*\)|\1:<a href=\"$HG_URL/rev/\2\">\2</a>|" \
860fec43 73 $LOG_NAME >> $HTML_NAME
39d844b6
RK
74 echo " </pre>" >> $HTML_NAME
75 echo " </body>" >> $HTML_NAME
76 echo "</html>" >> $HTML_NAME
77done
78
79echo "done."