aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/osmo-deps.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/osmo-deps.sh')
-rwxr-xr-xscripts/osmo-deps.sh7
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