aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-30 03:52:06 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-30 03:52:06 +0000
commita0cc5b2a40ad3fd711170a0116b9e03ca5290ec0 (patch)
treeba4c10e643e0c3fbdec51538448c9a3ba4d7bc6f /tool
parentb826d893fe160819796ece1149bacc5bb9473d5e (diff)
downloadruby-a0cc5b2a40ad3fd711170a0116b9e03ca5290ec0.tar.gz
git-refresh: fix for Solaris
* tool/git-refresh: unset variable `branch` if it is null, to get rid of substitutions which are not supported old Solaris. [ruby-dev:50102] [Bug #13522] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-xtool/git-refresh7
1 files changed, 4 insertions, 3 deletions
diff --git a/tool/git-refresh b/tool/git-refresh
index 2ee5bbfa39..1c1689cd2c 100755
--- a/tool/git-refresh
+++ b/tool/git-refresh
@@ -29,14 +29,15 @@ done
url="$1"
dir="$2"
shift 2
+[ x"$branch" = x ] && unset branch || :
if [ -d "$dir" ]; then
echo updating `expr "/$dir/" : '.*/\([^/][^/]*\)/'` ...
[ $quiet ] || set -x
$CHDIR "$dir"
- ${branch:+git fetch "$@"}
- exec git ${branch:+checkout} "${branch:-pull}" "$@"
+ ${branch+git fetch "$@"}
+ exec git ${branch+checkout} "${branch-pull}" "$@"
else
echo retrieving `expr "/$dir/" : '.*/\([^/][^/]*\)/'` ...
[ $quiet ] || set -x
- exec git clone ${branch:+--branch "$branch"} "$url" "$dir" "$@"
+ exec git clone ${branch+--branch "$branch"} "$url" "$dir" "$@"
fi