9 echo -n "Fetching latest revno... "
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..."
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)
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"
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"
30 if [ "$dropin" ]; then
31 if [ -x ./dropin ]; then
33 elif [ -x ../dropin ]; then
37 if [ "$upload_32" -o "$upload_64" ]; then
38 echo "Uploading to dropin. ^C to abort"
39 ../dropin $upload_32 $upload_64
43 specfile=chromium-browser-bin.spec
44 oldrev=$(awk '/^%define[ ]+svnrev[ ]+/{print $NF}' $specfile)
45 if [ "$oldrev" != "$rev" ]; then
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"
53 version=$MAJOR.$MINOR.$BUILD.$PATCH
55 echo "Updating $specfile for $version r$rev"
57 s/^\(%define[ \t]\+svnrev[ \t]\+\)[0-9]\+\$/\1$rev/
58 s/^\(Version:[ \t]\+\)[.0-9]\+\$/\1$version/
60 ../builder -ncs -5 $specfile