Repository: parquet-cpp Updated Branches: refs/heads/master 86b016885 -> e20cfa495
PARQUET-562: Simplified ZSH support in build scripts The original proposed patch can be implemented in a much simpler way. The complicated approach is only needed when used inside a function. Also some scripts in thirdparty did not support zsh which this patch adds. Author: Uwe L. Korn <[email protected]> Closes #78 from xhochy/simplified-zsh-support and squashes the following commits: 916da60 [Uwe L. Korn] Remove duplicated dirname e78cbcf [Uwe L. Korn] PARQUET-562: Simplified ZSH support in build scripts Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/e20cfa49 Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/e20cfa49 Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/e20cfa49 Branch: refs/heads/master Commit: e20cfa4955e8a5f6daeb744432bf37772d4c47b7 Parents: 86b0168 Author: Uwe L. Korn <[email protected]> Authored: Sun Mar 13 10:46:47 2016 -0700 Committer: Wes McKinney <[email protected]> Committed: Sun Mar 13 10:46:47 2016 -0700 ---------------------------------------------------------------------- setup_build_env.sh | 6 +----- thirdparty/build_thirdparty.sh | 2 +- thirdparty/download_thirdparty.sh | 2 +- thirdparty/set_thirdparty_env.sh | 6 +----- 4 files changed, 4 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/e20cfa49/setup_build_env.sh ---------------------------------------------------------------------- diff --git a/setup_build_env.sh b/setup_build_env.sh index c993963..37b702f 100755 --- a/setup_build_env.sh +++ b/setup_build_env.sh @@ -1,10 +1,6 @@ #!/usr/bin/env bash -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_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) : ${BUILD_DIR:=$SOURCE_DIR/build} # Create an isolated thirdparty http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/e20cfa49/thirdparty/build_thirdparty.sh ---------------------------------------------------------------------- diff --git a/thirdparty/build_thirdparty.sh b/thirdparty/build_thirdparty.sh index 32149ce..5f00055 100755 --- a/thirdparty/build_thirdparty.sh +++ b/thirdparty/build_thirdparty.sh @@ -2,7 +2,7 @@ set -x set -e -TP_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd) +TP_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) source $TP_DIR/versions.sh PREFIX=$TP_DIR/installed http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/e20cfa49/thirdparty/download_thirdparty.sh ---------------------------------------------------------------------- diff --git a/thirdparty/download_thirdparty.sh b/thirdparty/download_thirdparty.sh index c01c9b2..1ea2eba 100755 --- a/thirdparty/download_thirdparty.sh +++ b/thirdparty/download_thirdparty.sh @@ -3,7 +3,7 @@ set -x set -e -TP_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd) +TP_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) source $TP_DIR/versions.sh http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/e20cfa49/thirdparty/set_thirdparty_env.sh ---------------------------------------------------------------------- diff --git a/thirdparty/set_thirdparty_env.sh b/thirdparty/set_thirdparty_env.sh index cf16193..72b7074 100644 --- a/thirdparty/set_thirdparty_env.sh +++ b/thirdparty/set_thirdparty_env.sh @@ -1,10 +1,6 @@ #!/usr/bin/env bash -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_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) source $SOURCE_DIR/versions.sh if [ -z "$THIRDPARTY_DIR" ]; then
