| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 # Script to install everything needed to build chromium (well, ideally, anyway) | 2 # Script to install everything needed to build chromium (well, ideally, anyway) |
| 3 # See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions | 3 # See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions |
| 4 # and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit | 4 # and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit |
| 5 set -ex | 5 set -ex |
| 6 | 6 |
| 7 # Root can't access files on all filesystems, but /tmp should always be ok |
| 8 # (unless it's full). |
| 9 DIR=`mktemp -d` |
| 10 cd $DIR |
| 11 touch .created |
| 12 |
| 13 cleanup() { |
| 14 test -f $DIR/.created && rm -rf $DIR |
| 15 } |
| 16 |
| 7 # TODO(dkegel): add sha1sum verification | 17 # TODO(dkegel): add sha1sum verification |
| 8 download() { | 18 download() { |
| 9 dir=$1 | 19 dir=$1 |
| 10 file=$2 | 20 file=$2 |
| 11 if ! test -f $file | 21 if ! test -f $file |
| 12 then | 22 then |
| 13 wget $MIRROR/$dir/$file | 23 wget $MIRROR/$dir/$file |
| 14 fi | 24 fi |
| 15 } | 25 } |
| 16 | 26 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 98 } |
| 89 | 99 |
| 90 if egrep -q "Ubuntu 8.04|Ubuntu 8.10" /etc/issue && test `uname -m` = i686 | 100 if egrep -q "Ubuntu 8.04|Ubuntu 8.10" /etc/issue && test `uname -m` = i686 |
| 91 then | 101 then |
| 92 install_hardy | 102 install_hardy |
| 93 elif egrep -q "Ubuntu 8.04|Ubuntu 8.10" /etc/issue && test `uname -m` = x86_64 | 103 elif egrep -q "Ubuntu 8.04|Ubuntu 8.10" /etc/issue && test `uname -m` = x86_64 |
| 94 then | 104 then |
| 95 install_hardy_64 | 105 install_hardy_64 |
| 96 else | 106 else |
| 97 echo "Unsupported system" | 107 echo "Unsupported system" |
| 108 cleanup |
| 98 exit 1 | 109 exit 1 |
| 99 fi | 110 fi |
| 111 cleanup |
| 100 | 112 |
| OLD | NEW |