]>
Commit | Line | Data |
---|---|---|
ced35f34 ER |
1 | #!/bin/sh |
2 | # Make snapshot of nacl-binutils | |
3 | # Author: Elan Ruusamäe <glen@pld-linux.org> | |
4 | # $Id$ | |
5 | set -e | |
6 | ||
7 | # Generated from git | |
8 | # git clone http://git.chromium.org/native_client/nacl-gcc.git | |
9 | # (Checkout ID taken from chromium-15.0.874.106/native_client/tools/REVISIONS) | |
10 | # cd nacl-gcc | |
11 | # git checkout cff9ac884908ba53ae16149e7c7d19c336aa4895 | |
12 | # cd .. | |
13 | # For gcc version, echo gcc/BASE-VER | |
14 | # mv nacl-gcc nacl-gcc-4.4.3-gitcff9ac88 | |
15 | # tar cfj nacl-gcc-4.4.3-gitcff9ac88.tar.bz2 nacl-gcc-4.4.3-gitcff9ac88 | |
16 | ||
17 | package=nacl-gcc | |
18 | repo_url=http://git.chromium.org/native_client/$package.git | |
19 | specfile=crossnacl-gcc.spec | |
20 | ||
21 | chrome_version=20.0.1132.47 | |
22 | ||
23 | chrome_revision=$(curl -s https://omahaproxy.appspot.com/revision?version=$chrome_version) | |
24 | chrome_branch=$(IFS=.; set -- $chrome_version; echo $3) | |
25 | test -e DEPS.py || svn cat http://src.chromium.org/chrome/branches/$chrome_branch/src/DEPS@$chrome_revision > DEPS.py | |
26 | nacl_revision=$(awk -F'"' '/nacl_revision.:/{print $4}' DEPS.py) | |
27 | ||
ced35f34 ER |
28 | export GIT_DIR=$package/.git |
29 | ||
30 | if [ ! -d $package ]; then | |
31 | install -d $package | |
32 | git init | |
33 | git remote add origin $repo_url | |
34 | git fetch --depth 1 origin refs/heads/master:refs/remotes/origin/master | |
35 | else | |
36 | git fetch origin refs/heads/master:refs/remotes/origin/master | |
37 | fi | |
38 | ||
39 | # get src/native_client/tools/REVISIONS directly from svn | |
40 | test -e NACL_REVISIONS.sh || svn cat https://src.chromium.org/native_client/trunk/src/native_client/tools/REVISIONS@$nacl_revision > NACL_REVISIONS.sh | |
41 | ||
42 | if grep -Ev '^(#|(LINUX_HEADERS_FOR_NACL|NACL_(BINUTILS|GCC|GDB|GLIBC|NEWLIB))_COMMIT=[0-9a-f]+$|)' NACL_REVISIONS.sh >&2; then | |
43 | echo >&2 "I refuse to execute grabbed file for security concerns" | |
44 | exit 1 | |
45 | fi | |
46 | . ./NACL_REVISIONS.sh | |
47 | ||
48 | githash=$NACL_GCC_COMMIT | |
49 | version=$(git show $githash:gcc/BASE-VER) | |
50 | shorthash=$(git rev-parse --short $githash) | |
51 | prefix=$package-$version-git$shorthash | |
52 | ||
53 | if [ -f $prefix.tar.bz2 ]; then | |
54 | echo "Tarball $prefix.tar.bz2 already exists at $shorthash" | |
55 | exit 0 | |
56 | fi | |
57 | ||
58 | git archive $githash --prefix $prefix/ > $prefix.tar | |
59 | bzip2 -9 $prefix.tar | |
60 | ||
61 | ../dropin $prefix.tar.bz2 | |
62 | ||
63 | rm -f NACL_REVISIONS.sh DEPS.py |