summaryrefslogtreecommitdiffstats
path: root/coverity
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-10-11 08:16:03 +0800
committerHarald Welte <laforge@gnumonks.org>2017-10-11 08:44:18 +0800
commit6853b7dac103c597466c6b0d0595e372fa908cf4 (patch)
tree97d1f84ffa096965d7d7c96e12ade79e41a06374 /coverity
parent5b05a88bb3627ed1cf3b8c927d081c766d75e26f (diff)
coverity: Don't start with a new clone, but simply fetch/checkout
If a given git clone already exists, simply do a fetch + checkout -f, rather than cloning a decade worth of history from scratch. Change-Id: Icecb2d00a75bc303d84efafee5c1f2d52ba1b6b3
Diffstat (limited to 'coverity')
-rwxr-xr-xcoverity/prepare_source_Osmcocom.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/coverity/prepare_source_Osmcocom.sh b/coverity/prepare_source_Osmcocom.sh
index 386e16e..527bbc9 100755
--- a/coverity/prepare_source_Osmcocom.sh
+++ b/coverity/prepare_source_Osmcocom.sh
@@ -1,7 +1,8 @@
#!/bin/sh
-mkdir -p source-Osmocom
+BASEDIR=source-Osmocom
-cd source-Osmocom
+[ -d $BASEDIR ] || mkdir -p $BASEDIR
+cd $BASEDIR
for proj in \
asn1c \
@@ -23,7 +24,11 @@ for proj in \
osmo-hlr \
; do
- git clone git://git.osmocom.org/$proj
+ if [ -d $proj ]; then
+ (cd $proj && git fetch && git checkout -f -B master origin/master)
+ else
+ git clone git://git.osmocom.org/$proj
+ fi
done
git clone git://git.sysmocom.de/sysmo-bts/layer1-api