mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
b7ad549654
commit
eeed8b96a1
1 changed files with 4 additions and 3 deletions
|
@ -29,14 +29,15 @@ done
|
||||||
url="$1"
|
url="$1"
|
||||||
dir="$2"
|
dir="$2"
|
||||||
shift 2
|
shift 2
|
||||||
|
[ x"$branch" = x ] && unset branch || :
|
||||||
if [ -d "$dir" ]; then
|
if [ -d "$dir" ]; then
|
||||||
echo updating `expr "/$dir/" : '.*/\([^/][^/]*\)/'` ...
|
echo updating `expr "/$dir/" : '.*/\([^/][^/]*\)/'` ...
|
||||||
[ $quiet ] || set -x
|
[ $quiet ] || set -x
|
||||||
$CHDIR "$dir"
|
$CHDIR "$dir"
|
||||||
${branch:+git fetch "$@"}
|
${branch+git fetch "$@"}
|
||||||
exec git ${branch:+checkout} "${branch:-pull}" "$@"
|
exec git ${branch+checkout} "${branch-pull}" "$@"
|
||||||
else
|
else
|
||||||
echo retrieving `expr "/$dir/" : '.*/\([^/][^/]*\)/'` ...
|
echo retrieving `expr "/$dir/" : '.*/\([^/][^/]*\)/'` ...
|
||||||
[ $quiet ] || set -x
|
[ $quiet ] || set -x
|
||||||
exec git clone ${branch:+--branch "$branch"} "$url" "$dir" "$@"
|
exec git clone ${branch+--branch "$branch"} "$url" "$dir" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue