Commit | Line | Data |
---|---|---|
39d844b6 RK |
1 | #!/bin/sh |
2 | ||
39d844b6 RK |
3 | RUN_DIR=$(pwd) |
4 | cd $(dirname "$0") | |
5 | SCRIPT_DIR=$(pwd) | |
6 | ||
c1f7cc84 RK |
7 | # ============ vars specific to the versions ============== |
8 | ||
d8cb8857 RK |
9 | NAME_PRE=7 |
10 | NAME_POST=8 | |
11 | ||
12 | TAG_PRE_COMM=BETA_7_END | |
13 | TAG_POST_COMM=tip #BETA_8_END | |
987f09cf RK |
14 | TAG_PRE_MOZ=FIREFOX_BETA_7_END |
15 | TAG_POST_MOZ=tip #FIREFOX_BETA_8_END | |
d8cb8857 RK |
16 | TAG_PRE_EXT=SEAMONKEY_2_4_RELEASE |
17 | TAG_POST_EXT=tip #SEAMONKEY_2_5_RELEASE | |
7fc9ff7c | 18 | |
c1f7cc84 RK |
19 | # ===================== process repos ===================== |
20 | ||
21 | REPO_LIST="COMM MOZ MOZB DOMI CZ" | |
690b7d1f | 22 | |
c1f7cc84 RK |
23 | HG_COMM_DIR=/mnt/mozilla/hg/comm-beta |
24 | COMM_HG_OPTIONS= | |
25 | COMM_DIR=suite/themes/classic/ | |
26 | COMM_TAG_PRE=$TAG_PRE_COMM | |
27 | COMM_TAG_POST=$TAG_POST_COMM | |
28 | COMM_NAME_EXTRA=" (suite)" | |
29 | COMM_LOG=$RUN_DIR/theme-suitedefault.$NAME_PRE-$NAME_POST.log | |
690b7d1f | 30 | |
c1f7cc84 RK |
31 | HG_MOZ_DIR=/mnt/mozilla/hg/comm-beta/mozilla |
32 | MOZ_HG_OPTIONS= | |
33 | MOZ_DIR=toolkit/themes/winstripe/ | |
34 | MOZ_TAG_PRE=$TAG_PRE_MOZ | |
35 | MOZ_TAG_POST=$TAG_POST_MOZ | |
36 | MOZ_NAME_EXTRA=" (toolkit)" | |
37 | MOZ_LOG=$RUN_DIR/theme-toolkitwin.$NAME_PRE-$NAME_POST.log | |
39d844b6 | 38 | |
c1f7cc84 RK |
39 | HG_MOZB_DIR=/mnt/mozilla/hg/comm-beta/mozilla |
40 | MOZB_HG_OPTIONS= | |
41 | MOZB_DIR=browser/themes/winstripe/ | |
42 | MOZB_TAG_PRE=$TAG_PRE_MOZ | |
43 | MOZB_TAG_POST=$TAG_POST_MOZ | |
44 | MOZB_NAME_EXTRA=" (browser)" | |
45 | MOZB_LOG=$RUN_DIR/theme-browserwin.$NAME_PRE-$NAME_POST.log | |
ab799a7a | 46 | |
c1f7cc84 RK |
47 | HG_DOMI_DIR=/mnt/mozilla/hg/comm-beta/mozilla/extensions/inspector |
48 | DOMI_HG_OPTIONS= | |
49 | DOMI_DIR=resources/skin/classic/ | |
50 | DOMI_TAG_PRE=$TAG_PRE_EXT | |
51 | DOMI_TAG_POST=$TAG_POST_EXT | |
52 | DOMI_NAME_EXTRA= | |
53 | DOMI_LOG=$RUN_DIR/theme-domiclassic.$NAME_PRE-$NAME_POST.log | |
690b7d1f | 54 | |
c1f7cc84 RK |
55 | HG_CZ_DIR=/mnt/mozilla/hg/comm-beta/mozilla/extensions/irc |
56 | CZ_HG_OPTIONS= | |
57 | CZ_DIR=xul/skin/ | |
58 | CZ_TAG_PRE=$TAG_PRE_EXT | |
59 | CZ_TAG_POST=$TAG_POST_EXT | |
60 | CZ_NAME_EXTRA= | |
61 | CZ_LOG=$RUN_DIR/theme-chatzilla.$NAME_PRE-$NAME_POST.log | |
40f781fe | 62 | |
c1f7cc84 RK |
63 | for 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 | |
81 | done | |
82 | cd $RUN_DIR | |
39d844b6 | 83 | |
7fc9ff7c | 84 | for repo in $REPO_LIST; do |
39d844b6 | 85 | HG_DIR_VAR="HG_${repo}_DIR" |
c1f7cc84 RK |
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} | |
39d844b6 | 90 | LOG_VAR="${repo}_LOG" |
f32e4f11 RK |
91 | NAME_EXTRA_VAR="${repo}_NAME_EXTRA" |
92 | NAME_EXTRA=${!NAME_EXTRA_VAR} | |
39d844b6 | 93 | HG_URL=`awk -F ' *= *' '/default *=/ { print $2 }' ${!HG_DIR_VAR}/.hg/hgrc` |
f32e4f11 | 94 | REPO_NAME=`basename $HG_URL`$NAME_EXTRA |
860fec43 | 95 | LOG_NAME=${!LOG_VAR} |
690b7d1f | 96 | HTML_NAME=${LOG_NAME/.log/.html} |
39d844b6 RK |
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 | |
c1f7cc84 | 105 | echo " <h2>$TAG_PRE to $TAG_POST</h2>" >> $HTML_NAME |
39d844b6 | 106 | echo " <pre>" >> $HTML_NAME |
362ae058 | 107 | sed -e "s/&/\&/g" -e "s/</\</g" -e "s/>/\>/g" \ |
39d844b6 | 108 | -e "s|\(changeset: *[0-9]*\):\([0-9a-f]*\)|\1:<a href=\"$HG_URL/rev/\2\">\2</a>|" \ |
860fec43 | 109 | $LOG_NAME >> $HTML_NAME |
39d844b6 RK |
110 | echo " </pre>" >> $HTML_NAME |
111 | echo " </body>" >> $HTML_NAME | |
112 | echo "</html>" >> $HTML_NAME | |
113 | done | |
114 | ||
115 | echo "done." |