From 149a91577040f79f893817687814fb6e73cfc017 Mon Sep 17 00:00:00 2001 From: Yamashita Yuu Date: Thu, 1 May 2014 13:13:40 +0900 Subject: [PATCH] Import recent changes from ruby-build 20140420 --- plugins/python-build/bin/pyenv-install | 2 +- plugins/python-build/bin/python-build | 5 +++-- plugins/python-build/test/test_helper.bash | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/python-build/bin/pyenv-install b/plugins/python-build/bin/pyenv-install index 1c30ac8c..677f5c8b 100755 --- a/plugins/python-build/bin/pyenv-install +++ b/plugins/python-build/bin/pyenv-install @@ -45,7 +45,7 @@ usage() { definitions() { local query="$1" - python-build --definitions | grep -F "$query" || true + python-build --definitions | $(type -p ggrep grep | head -1) -F "$query" || true } indent() { diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 13bc3264..56834874 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1,6 +1,6 @@ #!/usr/bin/env bash -PYTHON_BUILD_VERSION="20140408" +PYTHON_BUILD_VERSION="20140420" set -E exec 3<&2 # preserve original stderr at fd 3 @@ -284,7 +284,8 @@ fetch_tarball() { fi if ! reuse_existing_tarball "$package_filename" "$checksum"; then - echo "Downloading ${package_filename}..." >&2 + local tarball_filename=$(basename $package_url) + echo "Downloading ${tarball_filename}..." >&2 http head "$mirror_url" && download_tarball "$mirror_url" "$package_filename" "$checksum" || download_tarball "$package_url" "$package_filename" "$checksum" diff --git a/plugins/python-build/test/test_helper.bash b/plugins/python-build/test/test_helper.bash index 6bbc31ab..f4adba9c 100644 --- a/plugins/python-build/test/test_helper.bash +++ b/plugins/python-build/test/test_helper.bash @@ -115,7 +115,7 @@ assert_output() { assert_output_contains() { local expected="$1" - echo "$output" | grep -F "$expected" >/dev/null || { + echo "$output" | $(type -p ggrep grep | head -1) -F "$expected" >/dev/null || { { echo "expected output to contain $expected" echo "actual: $output" } | flunk