Index: build/install-build-deps.sh |
diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh |
index 4d104519083fcfdd18e80763898ef754c68163d0..c891f2709da576de67628f3796bb3e3a72d2873a 100755 |
--- a/build/install-build-deps.sh |
+++ b/build/install-build-deps.sh |
@@ -31,6 +31,7 @@ do |
--no-prompt) do_default=1 |
do_quietly="-qq --assume-yes" |
;; |
+ --unsupported) do_unsupported=1;; |
*) usage;; |
esac |
shift |
@@ -38,16 +39,23 @@ done |
ubuntu_versions="10\.04|10\.10|11\.04|11\.10|12\.04|12\.10" |
ubuntu_codenames="lucid|maverick|natty|oneiric|precise|quantal" |
+ubuntu_issue="Ubuntu ($ubuntu_versions|$ubuntu_codenames)" |
+# GCEL is an Ubuntu-derived VM image used on Google Compute Engine; /etc/issue |
+# doesn't contain a version number so just trust that the user knows what |
+# they're doing. |
+gcel_issue="^GCEL" |
+ |
+if [ 0 -eq "${do_unsupported-0}" ] ; then |
+ if ! egrep -q "($ubuntu_issue|$gcel_issue)" /etc/issue; then |
+ echo "ERROR: Only Ubuntu 10.04 (lucid) through 12.10 (quantal) are"\ |
+ "currently supported" >&2 |
+ exit 1 |
+ fi |
-if ! egrep -q "Ubuntu ($ubuntu_versions|$ubuntu_codenames)" /etc/issue; then |
- echo "ERROR: Only Ubuntu 10.04 (lucid) through 12.10 (quantal) are currently"\ |
- "supported" >&2 |
- exit 1 |
-fi |
- |
-if ! uname -m | egrep -q "i686|x86_64"; then |
- echo "Only x86 architectures are currently supported" >&2 |
- exit |
+ if ! uname -m | egrep -q "i686|x86_64"; then |
+ echo "Only x86 architectures are currently supported" >&2 |
+ exit |
+ fi |
fi |
if [ "x$(id -u)" != x0 ]; then |