]>
Commit | Line | Data |
---|---|---|
f7d776fe | 1 | #!/bin/sh |
611042d5 | 2 | set -e |
ce3ccb19 | 3 | dropin=0 |
f7d776fe ER |
4 | |
5 | if [ "$1" ]; then | |
6 | rev=$1 | |
7 | echo "Using $rev..." | |
8 | else | |
9 | echo -n "Fetching latest revno... " | |
993fde95 CM |
10 | rev=$(wget -q -O - http://build.chromium.org/buildbot/continuous/linux/LATEST/REVISION) |
11 | rev64=$(wget -q -O - http://build.chromium.org/buildbot/continuous/linux64/LATEST/REVISION) | |
12 | if [ "$rev" != "$rev64" ] && [ $(uname -m) -eq "x86_64" ]; then | |
13 | echo -n >&2 "Current 32bit build ($rev) does not match 64bit build ($rev64). The upstream buildbot probably failed. Usuing latest 64bit revision..." | |
14 | rev=$rev64 | |
15 | fi | |
f7d776fe | 16 | echo "$rev" |
993fde95 CM |
17 | # TODO: use release branches instead of trunk. Current release can be looked up like this: |
18 | #linuxdev=$(wget -q -O - http://omahaproxy.appspot.com | grep '^linux,dev' | cut -d, -f3) | |
f7d776fe ER |
19 | fi |
20 | ||
e0ca2098 ER |
21 | if [ ! -f chromium-browser32-r$rev.zip ]; then |
22 | wget http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/$rev/chrome-linux.zip -c -O chromium-browser32-r$rev.zip | |
23 | upload_32="chromium-browser32-r$rev.zip" | |
ec977a2a | 24 | fi |
e0ca2098 ER |
25 | if [ ! -f chromium-browser64-r$rev.zip ]; then |
26 | wget http://build.chromium.org/buildbot/snapshots/chromium-rel-linux-64/$rev/chrome-linux.zip -c -O chromium-browser64-r$rev.zip | |
27 | upload_64="chromium-browser64-r$rev.zip" | |
ec977a2a ER |
28 | fi |
29 | ||
ce3ccb19 ER |
30 | if [ "$dropin" ]; then |
31 | if [ -x ./dropin ]; then | |
32 | dropin=./dropin | |
33 | elif [ -x ../dropin ]; then | |
34 | dropin=../dropin | |
35 | fi | |
f9a1143c | 36 | |
ce3ccb19 ER |
37 | if [ "$upload_32" -o "$upload_64" ]; then |
38 | echo "Uploading to dropin. ^C to abort" | |
39 | ../dropin $upload_32 $upload_64 | |
40 | fi | |
f9a1143c | 41 | fi |
a9c889b8 | 42 | |
0d727ae6 ER |
43 | specfile=chromium-browser-bin.spec |
44 | oldrev=$(awk '/^%define[ ]+svnrev[ ]+/{print $NF}' $specfile) | |
45 | if [ "$oldrev" != "$rev" ]; then | |
611042d5 ER |
46 | # revno => VERSION hint by Caleb Maclennan <caleb#alerque.com> |
47 | wget -q -O VERSION.sh http://src.chromium.org/viewvc/chrome/trunk/src/chrome/VERSION?revision=$rev | |
48 | if grep -Ev '^(MAJOR|MINOR|BUILD|PATCH)=[0-9]+$' VERSION.sh >&2; then | |
49 | echo >&2 "I refuse to execute grabbed file for security concerns" | |
50 | exit 1 | |
51 | fi | |
52 | . ./VERSION.sh | |
53 | version=$MAJOR.$MINOR.$BUILD.$PATCH | |
54 | ||
55 | echo "Updating $specfile for $version r$rev" | |
56 | sed -i -e " | |
57 | s/^\(%define[ \t]\+svnrev[ \t]\+\)[0-9]\+\$/\1$rev/ | |
58 | s/^\(Version:[ \t]\+\)[.0-9]\+\$/\1$version/ | |
59 | " $specfile | |
0d727ae6 ER |
60 | ../builder -ncs -5 $specfile |
61 | fi |