kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [01/33] incubator-kudu git commit: Add enable_devtoolset.sh build script helper
Date Fri, 08 Jan 2016 02:22:03 GMT
Repository: incubator-kudu
Updated Branches:
  refs/heads/master 2187df374 -> db430f50a


Add enable_devtoolset.sh build script helper

In our build and in Jenkins configuration we need to enable the Red Hat
devtoolset while running on Red Hat 6 based systems. This commit adds a
helper script to enable the devtoolset dependent on the system version.

Change-Id: I40e7bdd0fcf471ccc2894b874e2ab6e4e1e826d4
Reviewed-on: http://gerrit.cloudera.org:8080/1688
Tested-by: Internal Jenkins
Reviewed-by: Dan Burkert <dan@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/5dac2ab2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/5dac2ab2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/5dac2ab2

Branch: refs/heads/master
Commit: 5dac2ab29dcf6e52f3181dbbc0d2863c136ad3ed
Parents: 2187df3
Author: Dan Burkert <dan@cloudera.com>
Authored: Mon Dec 28 14:36:06 2015 -0800
Committer: Dan Burkert <dan@cloudera.com>
Committed: Thu Jan 7 03:53:38 2016 +0000

----------------------------------------------------------------------
 build-support/enable_devtoolset.sh | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/5dac2ab2/build-support/enable_devtoolset.sh
----------------------------------------------------------------------
diff --git a/build-support/enable_devtoolset.sh b/build-support/enable_devtoolset.sh
new file mode 100755
index 0000000..95cdbf5
--- /dev/null
+++ b/build-support/enable_devtoolset.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+# Copyright 2015 Cloudera, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e
+
+# Enables the Red Hat devtoolset on RHEL 6 based systems and executes the
+# arguments. On non-RHEL 6 systems, the arguments are executed without changes
+# to the environment.
+# USAGE: ./enable_devtoolset.sh <command> <args>...
+
+if [[ "$OSTYPE" =~ ^linux ]] && \
+   [[ "$(lsb_release -irs)" =~ (CentOS|RedHatEnterpriseServer)[[:space:]]+6\.[[:digit:]]+
]]; then
+  scl enable devtoolset-3 "$*"
+else
+  $@
+fi


Mime
View raw message