aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kevi...@apache.org
Subject git commit: AURORA-225: Shell scripts in checkout should use an absolute path
Date Tue, 25 Feb 2014 21:08:38 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master c07b799f1 -> 6e7acbfb7


AURORA-225: Shell scripts in checkout should use an absolute path

Testing Done:
Submitted this review with the following command:
 ../rbt post -o -g (from inside of build-support directory)

Bugs closed: AURORA-225

Reviewed at https://reviews.apache.org/r/18345/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/6e7acbfb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/6e7acbfb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/6e7acbfb

Branch: refs/heads/master
Commit: 6e7acbfb7a8b4cb9694fbc510fc67e07c1b34454
Parents: c07b799
Author: Dan Norris <protochron@gmail.com>
Authored: Tue Feb 25 13:08:12 2014 -0800
Committer: Kevin Sweeney <kevints@apache.org>
Committed: Tue Feb 25 13:08:12 2014 -0800

----------------------------------------------------------------------
 build-support/pex        | 15 ++++++++-------
 build-support/virtualenv |  7 ++++---
 pants                    | 12 +++++++-----
 rbt                      | 15 ++++++++-------
 4 files changed, 27 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/6e7acbfb/build-support/pex
----------------------------------------------------------------------
diff --git a/build-support/pex b/build-support/pex
index cd083d9..56f952a 100755
--- a/build-support/pex
+++ b/build-support/pex
@@ -18,16 +18,17 @@
 set -e
 
 TWITTER_COMMON_PYTHON_VERSION=0.3.0
+HERE=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
 
-if ! [ -f build-support/pex.venv/BOOTSTRAPPED ] || \
-    [ $(< build-support/pex.venv/BOOTSTRAPPED) != $TWITTER_COMMON_PYTHON_VERSION ]; then
+if ! [ -f "$HERE/pex.venv/BOOTSTRAPPED" ] || \
+    [ $(< "$HERE/pex.venv/BOOTSTRAPPED") != $TWITTER_COMMON_PYTHON_VERSION ]; then
 
   echo Bootstrapping twitter.common.python @ $TWITTER_COMMON_PYTHON_VERSION
-  rm -fr build-support/pex.venv
-  ./build-support/virtualenv build-support/pex.venv
-  source build-support/pex.venv/bin/activate
+  rm -fr "$HERE/pex.venv"
+  "$HERE/virtualenv" "$HERE/pex.venv"
+  source "$HERE/pex.venv/bin/activate"
   pip install "twitter.common.python==$TWITTER_COMMON_PYTHON_VERSION"
-  echo $TWITTER_COMMON_PYTHON_VERSION > build-support/pex.venv/BOOTSTRAPPED
+  echo $TWITTER_COMMON_PYTHON_VERSION > "$HERE"/pex.venv/BOOTSTRAPPED
 fi
-source build-support/pex.venv/bin/activate
+source "$HERE/pex.venv/bin/activate"
 exec pex "$@"

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/6e7acbfb/build-support/virtualenv
----------------------------------------------------------------------
diff --git a/build-support/virtualenv b/build-support/virtualenv
index d7a99e0..e04a472 100755
--- a/build-support/virtualenv
+++ b/build-support/virtualenv
@@ -14,8 +14,9 @@ fi
 
 echo "Using $PY" >&2
 
-if ! [ -f "build-support/virtualenv-$VIRTUALENV_VERSION/BOOTSTRAPPED" ]; then
-  pushd build-support
+HERE=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
+if ! [ -f "$HERE/virtualenv-$VIRTUALENV_VERSION/BOOTSTRAPPED" ]; then
+  pushd "$HERE"
   curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-$VIRTUALENV_VERSION.tar.gz
   tar zxvf virtualenv-$VIRTUALENV_VERSION.tar.gz
   # TODO(ksweeney): Checksum
@@ -23,4 +24,4 @@ if ! [ -f "build-support/virtualenv-$VIRTUALENV_VERSION/BOOTSTRAPPED" ];
then
   popd
 fi
 
-exec "$PY" build-support/virtualenv-$VIRTUALENV_VERSION/virtualenv.py "$@"
+exec "$PY" "$HERE/virtualenv-$VIRTUALENV_VERSION/virtualenv.py" "$@"

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/6e7acbfb/pants
----------------------------------------------------------------------
diff --git a/pants b/pants
index 4dc17fd..5684730 100755
--- a/pants
+++ b/pants
@@ -17,15 +17,17 @@
 set -o errexit
 set -o nounset
 
+HERE=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
+
 PANTS_VERSION=0.0.14-dev2
-if ! [[ -e build-support/pants-$PANTS_VERSION.pex ]]; then
+if ! [[ -e "$HERE/build-support/pants-$PANTS_VERSION.pex" ]]; then
   echo "Building pants.pex @ $PANTS_VERSION"
-  ./build-support/pex \
+  "$HERE/build-support/pex" \
     --requirement "twitter.pants==$PANTS_VERSION" \
     --entry-point twitter.pants.bin.pants_exe:main \
-    -p build-support/pants-$PANTS_VERSION.pex.tmp
-  mv build-support/pants-$PANTS_VERSION.pex.tmp build-support/pants-$PANTS_VERSION.pex  #
2PC
+    -p "$HERE/build-support/pants-$PANTS_VERSION.pex.tmp"
+  mv "$HERE/build-support/pants-$PANTS_VERSION.pex.tmp" "$HERE/build-support/pants-$PANTS_VERSION.pex"
 # 2PC
   echo "Built pants-$PANTS_VERSION.pex"
 fi
 
-exec ./build-support/pants-$PANTS_VERSION.pex "$@"
+exec "$HERE/build-support/pants-$PANTS_VERSION.pex" "$@"

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/6e7acbfb/rbt
----------------------------------------------------------------------
diff --git a/rbt b/rbt
index c03c4c4..b03c87f 100755
--- a/rbt
+++ b/rbt
@@ -17,17 +17,18 @@
 # Wrapper script for self-bootstrapping rbt.
 set -e
 
+HERE=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
 RBTOOLS_VERSION=0.5.5
-if ! [ -f build-support/rbt.venv/BOOTSTRAPPED ] || \
-    [ x`cat build-support/rbt.venv/BOOTSTRAPPED` != x$RBTOOLS_VERSION ]; then
+if ! [ -f "$HERE/build-support/rbt.venv/BOOTSTRAPPED" ] || \
+    [ x`cat "$HERE/build-support/rbt.venv/BOOTSTRAPPED"` != x$RBTOOLS_VERSION ]; then
 
   echo Bootstrapping rbtools @ $RBTOOLS_VERSION
-  rm -fr build-support/rbt.venv
-  ./build-support/virtualenv build-support/rbt.venv
-  source build-support/rbt.venv/bin/activate
+  rm -fr "$HERE/build-support/rbt.venv"
+  "$HERE/build-support/virtualenv" "$HERE/build-support/rbt.venv"
+  source "$HERE/build-support/rbt.venv/bin/activate"
   pip install "RBTools==$RBTOOLS_VERSION"
-  echo $RBTOOLS_VERSION > build-support/rbt.venv/BOOTSTRAPPED
+  echo $RBTOOLS_VERSION > "$HERE/build-support/rbt.venv/BOOTSTRAPPED"
 fi
-source build-support/rbt.venv/bin/activate
+source "$HERE/build-support/rbt.venv/bin/activate"
 # TODO(kevints): Use ./pants py here instead of virtualenv.
 exec rbt "$@"


Mime
View raw message