adjust both themes for changes in classic in SeaMonkey 2.16 cycle
[themes.git] / origdiff
... / ...
CommitLineData
1#!/bin/sh
2
3RUN_DIR=$(pwd)
4cd $(dirname "$0")
5SCRIPT_DIR=$(pwd)
6
7# ============ vars specific to the versions ==============
8
9NAME_PRE=18
10NAME_POST=19
11
12TAG_PRE_COMM=BETA_18_END
13TAG_POST_COMM=tip #BETA_19_END
14TAG_PRE_MOZ=FIREFOX_BETA_18_END
15TAG_POST_MOZ=tip #FIREFOX_BETA_19_END
16TAG_PRE_EXT=SEAMONKEY_2_15_RELEASE
17TAG_POST_EXT=tip #SEAMONKEY_2_16_RELEASE
18
19# ===================== process repos =====================
20
21REPO_LIST="COMM MOZ MOZB DOMI CZ"
22
23HG_COMM_DIR=/mnt/mozilla/hg/comm-beta
24COMM_HG_OPTIONS=
25COMM_DIR=suite/themes/classic/
26COMM_TAG_PRE=$TAG_PRE_COMM
27COMM_TAG_POST=$TAG_POST_COMM
28COMM_NAME_EXTRA=" (suite)"
29COMM_LOG=$RUN_DIR/theme-suitedefault.$NAME_PRE-$NAME_POST.log
30
31HG_MOZ_DIR=/mnt/mozilla/hg/comm-beta/mozilla
32MOZ_HG_OPTIONS=
33MOZ_DIR=toolkit/themes/winstripe/
34MOZ_TAG_PRE=$TAG_PRE_MOZ
35MOZ_TAG_POST=$TAG_POST_MOZ
36MOZ_NAME_EXTRA=" (toolkit)"
37MOZ_LOG=$RUN_DIR/theme-toolkitwin.$NAME_PRE-$NAME_POST.log
38
39HG_MOZB_DIR=/mnt/mozilla/hg/comm-beta/mozilla
40MOZB_HG_OPTIONS=
41MOZB_DIR=browser/themes/winstripe/
42MOZB_TAG_PRE=$TAG_PRE_MOZ
43MOZB_TAG_POST=$TAG_POST_MOZ
44MOZB_NAME_EXTRA=" (browser)"
45MOZB_LOG=$RUN_DIR/theme-browserwin.$NAME_PRE-$NAME_POST.log
46
47HG_DOMI_DIR=/mnt/mozilla/hg/comm-beta/mozilla/extensions/inspector
48DOMI_HG_OPTIONS=
49DOMI_DIR=resources/skin/classic/
50DOMI_TAG_PRE=$TAG_PRE_EXT
51DOMI_TAG_POST=$TAG_POST_EXT
52DOMI_NAME_EXTRA=
53DOMI_LOG=$RUN_DIR/theme-domiclassic.$NAME_PRE-$NAME_POST.log
54
55HG_CZ_DIR=/mnt/mozilla/hg/comm-beta/mozilla/extensions/irc
56CZ_HG_OPTIONS=
57CZ_DIR=xul/skin/
58CZ_TAG_PRE=$TAG_PRE_EXT
59CZ_TAG_POST=$TAG_POST_EXT
60CZ_NAME_EXTRA=
61CZ_LOG=$RUN_DIR/theme-chatzilla.$NAME_PRE-$NAME_POST.log
62
63for repo in $REPO_LIST; do
64 HG_DIR_VAR="HG_${repo}_DIR"
65 HG_DIR=${!HG_DIR_VAR}
66 HG_OPTIONS_VAR="${repo}_HG_OPTIONS"
67 HG_OPTIONS=${!HG_OPTIONS_VAR}
68 SKIN_DIR_VAR="${repo}_DIR"
69 SKIN_DIR=${!SKIN_DIR_VAR}
70 TAG_PRE_VAR="${repo}_TAG_PRE"
71 TAG_PRE=${!TAG_PRE_VAR}
72 TAG_POST_VAR="${repo}_TAG_POST"
73 TAG_POST=${!TAG_POST_VAR}
74 LOG_VAR="${repo}_LOG"
75 LOG_NAME=${!LOG_VAR}
76 if [ ! -e $LOG_NAME ]; then
77 echo "Getting $LOG_NAME..."
78 cd $HG_DIR
79 LC_ALL=C hg log -r $TAG_PRE:$TAG_POST $HG_OPTIONS $SKIN_DIR > $LOG_NAME
80 fi
81done
82cd $RUN_DIR
83
84for repo in $REPO_LIST; do
85 HG_DIR_VAR="HG_${repo}_DIR"
86 TAG_PRE_VAR="${repo}_TAG_PRE"
87 TAG_PRE=${!TAG_PRE_VAR}
88 TAG_POST_VAR="${repo}_TAG_POST"
89 TAG_POST=${!TAG_POST_VAR}
90 LOG_VAR="${repo}_LOG"
91 NAME_EXTRA_VAR="${repo}_NAME_EXTRA"
92 NAME_EXTRA=${!NAME_EXTRA_VAR}
93 HG_URL=`awk -F ' *= *' '/default *=/ { print $2 }' ${!HG_DIR_VAR}/.hg/hgrc`
94 REPO_NAME=`basename $HG_URL`$NAME_EXTRA
95 LOG_NAME=${!LOG_VAR}
96 HTML_NAME=${LOG_NAME/.log/.html}
97 echo "Writing $HTML_NAME..."
98 echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' > $HTML_NAME
99 echo "<html>" >> $HTML_NAME
100 echo " <head>" >> $HTML_NAME
101 echo " <title>$REPO_NAME Theme Changes</title>" >> $HTML_NAME
102 echo " </head>" >> $HTML_NAME
103 echo " <body>" >> $HTML_NAME
104 echo " <h1>$REPO_NAME Theme Changes</h1>" >> $HTML_NAME
105 echo " <h2>$TAG_PRE to $TAG_POST</h2>" >> $HTML_NAME
106 echo " <pre>" >> $HTML_NAME
107 sed -e "s/&/\&amp;/g" -e "s/</\&lt;/g" -e "s/>/\&gt;/g" \
108 -e "s|\(changeset: *[0-9]*\):\([0-9a-f]*\)|\1:<a href=\"$HG_URL/rev/\2\">\2</a>|" \
109 $LOG_NAME >> $HTML_NAME
110 echo " </pre>" >> $HTML_NAME
111 echo " </body>" >> $HTML_NAME
112 echo "</html>" >> $HTML_NAME
113done
114
115echo "done."