From 03ae142d7257999b196593cf8bea77bdc2f50915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Fri, 31 Oct 2014 17:33:10 -0400 Subject: [PATCH] use a local version of mason instead of writing into ~/.mason fixes #526 --- .gitmodules | 3 +++ .mason | 1 + .travis.yml | 2 +- configure | 7 +------ scripts/local_mason.sh | 8 ++++++++ 5 files changed, 14 insertions(+), 7 deletions(-) create mode 160000 .mason create mode 100755 scripts/local_mason.sh diff --git a/.gitmodules b/.gitmodules index 850e0c7e2..e1831c317 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,6 @@ [submodule "test/suite"] path = test/suite url = https://github.com/mapbox/mapbox-gl-test-suite.git +[submodule ".mason"] + path = .mason + url = https://github.com/mapbox/mason.git diff --git a/.mason b/.mason new file mode 160000 index 000000000..462fe2847 --- /dev/null +++ b/.mason @@ -0,0 +1 @@ +Subproject commit 462fe28479ea700943abd2fde15b03038a168da0 diff --git a/.travis.yml b/.travis.yml index 8edbe3c15..a7c7109f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,9 +25,9 @@ env: - LD_LIBRARY_PATH: '/usr/local/lib' before_install: +- source ./scripts/local_mason.sh - source ./scripts/travis_helper.sh - source ./scripts/flags.sh -- (git clone https://github.com/mapbox/mason.git ~/.mason ; sudo ln -s ~/.mason/mason /usr/local/bin/mason) - ./scripts/travis_before_install.sh - if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then export LD_LIBRARY_PATH=`mason prefix mesa 10.3.1`/lib; fi - if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then glxinfo; fi diff --git a/configure b/configure index 8b82a7208..2b5ec80ca 100755 --- a/configure +++ b/configure @@ -2,7 +2,6 @@ set -e set -o pipefail -shopt -s expand_aliases CONFIG_FILE=${1:-config.gypi} @@ -16,11 +15,7 @@ function finish { trap finish EXIT # Install mason -if [[ ! -d ~/.mason ]]; then - >&2 echo -e "\033[1m\033[32m* Installing Mason\033[0m" - git clone https://github.com/mapbox/mason.git ~/.mason -fi -alias mason='~/.mason/mason' +. ./scripts/local_mason.sh case ${MASON_PLATFORM} in 'ios') diff --git a/scripts/local_mason.sh b/scripts/local_mason.sh new file mode 100755 index 000000000..d51b2e36b --- /dev/null +++ b/scripts/local_mason.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +shopt -s expand_aliases + +git submodule update --init .mason + +alias mason=`pwd`/.mason/mason +export MASON_DIR=`pwd`/.mason