From: Michal Sojka Date: Fri, 11 May 2018 14:40:23 +0000 (+0200) Subject: Modify source_sync.sh to run "git submodule add" rather than "git clone" X-Git-Tag: 0.0~41 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/hercules2020/jailhouse-build.git/commitdiff_plain/7811294226d65da2e2cbadcef6b1bee5b79d7cdf?hp=ac0c7bbbb696994948d6b4a54843180a3b5c703a Modify source_sync.sh to run "git submodule add" rather than "git clone" --- diff --git a/nv-tegra/source_sync.sh b/nv-tegra/source_sync.sh index 5a848b8..b8eb4e2 100755 --- a/nv-tegra/source_sync.sh +++ b/nv-tegra/source_sync.sh @@ -183,7 +183,7 @@ function DownloadAndSync { else echo "Downloading default $WHAT source..." - git clone "$REPO_URL" -n ${LDK_SOURCE_DIR} 2>&1 >/dev/null + git submodule add -b "$TAG" "$REPO_URL" ${LDK_SOURCE_DIR} if [ $? -ne 0 ]; then echo "$2 source sync failed!" echo "" @@ -202,22 +202,22 @@ function DownloadAndSync { UpdateTags $OPT $TAG fi - if [ ! -z "$TAG" ]; then - pushd ${LDK_SOURCE_DIR} > /dev/null - git tag -l 2>/dev/null | grep -q -P "^$TAG\$" - if [ $? -eq 0 ]; then - echo "Syncing up with tag $TAG..." - git checkout -b mybranch_$(date +%Y-%m-%d-%s) $TAG - echo "$2 source sync'ed to tag $TAG successfully!" - else - echo "Couldn't find tag $TAG" - echo "$2 source sync to tag $TAG failed!" - RET=1 - fi - popd > /dev/null - fi - echo "" - echo "" +# if [ ! -z "$TAG" ]; then +# pushd ${LDK_SOURCE_DIR} > /dev/null +# git tag -l 2>/dev/null | grep -q -P "^$TAG\$" +# if [ $? -eq 0 ]; then +# echo "Syncing up with tag $TAG..." +# git checkout -b mybranch_$(date +%Y-%m-%d-%s) $TAG +# echo "$2 source sync'ed to tag $TAG successfully!" +# else +# echo "Couldn't find tag $TAG" +# echo "$2 source sync to tag $TAG failed!" +# RET=1 +# fi +# popd > /dev/null +# fi +# echo "" +# echo "" return "$RET" }