diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/osmo-deps.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/osmo-deps.sh b/scripts/osmo-deps.sh index a4afec5..5a7dcc2 100755 --- a/scripts/osmo-deps.sh +++ b/scripts/osmo-deps.sh @@ -1,7 +1,12 @@ #!/bin/sh set -ex project="$1" -branch="origin/${2:-master}" +branch="${2:-master}" +# If ref is really a branch, we want to track the remote one: +if [ "x$(git branch -a | grep -c "remotes/origin/$branch\$")" != "x0" ]; then + branch="origin/$branch" +fi + if ! test -d "$project"; then |