You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@parquet.apache.org by we...@apache.org on 2016/03/06 18:07:56 UTC

parquet-cpp git commit: PARQUET-558: Add zsh support to build script

Repository: parquet-cpp
Updated Branches:
  refs/heads/master 64862b0ed -> caf2576ce


PARQUET-558: Add zsh support to build script

Author: Uwe L. Korn <uw...@xhochy.com>

Closes #75 from xhochy/buildscripts-zsh-support and squashes the following commits:

5e8f537 [Uwe L. Korn] Add zsh support to setup_build_env.sh
5b5506e [Uwe L. Korn] PARQUET-558: Add zsh support to build script


Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/caf2576c
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/caf2576c
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/caf2576c

Branch: refs/heads/master
Commit: caf2576ce21e7cf40870d6a74db0aea4d81319ac
Parents: 64862b0
Author: Uwe L. Korn <uw...@xhochy.com>
Authored: Sun Mar 6 09:07:45 2016 -0800
Committer: Wes McKinney <we...@apache.org>
Committed: Sun Mar 6 09:07:45 2016 -0800

----------------------------------------------------------------------
 setup_build_env.sh               | 6 +++++-
 thirdparty/set_thirdparty_env.sh | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/caf2576c/setup_build_env.sh
----------------------------------------------------------------------
diff --git a/setup_build_env.sh b/setup_build_env.sh
index e6f0c59..c993963 100755
--- a/setup_build_env.sh
+++ b/setup_build_env.sh
@@ -1,6 +1,10 @@
 #!/usr/bin/env bash
 
-SOURCE_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
+if [ -n "${BASH_VERSION}" ]; then
+    SOURCE_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
+elif [ -n "${ZSH_VERSION}" ]; then
+    SOURCE_DIR=$(cd "$(dirname "${(%):-%N}")"; pwd)
+fi
 : ${BUILD_DIR:=$SOURCE_DIR/build}
 
 # Create an isolated thirdparty

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/caf2576c/thirdparty/set_thirdparty_env.sh
----------------------------------------------------------------------
diff --git a/thirdparty/set_thirdparty_env.sh b/thirdparty/set_thirdparty_env.sh
index 6f283e3..cf16193 100644
--- a/thirdparty/set_thirdparty_env.sh
+++ b/thirdparty/set_thirdparty_env.sh
@@ -1,6 +1,10 @@
 #!/usr/bin/env bash
 
-SOURCE_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
+if [ -n "${BASH_VERSION}" ]; then
+    SOURCE_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
+elif [ -n "${ZSH_VERSION}" ]; then
+    SOURCE_DIR=$(cd "$(dirname "${(%):-%N}")"; pwd)
+fi
 source $SOURCE_DIR/versions.sh
 
 if [ -z "$THIRDPARTY_DIR" ]; then