From 66094849a2067a5a0ca82ec6f0a155793795e809006d83a09fde58343eb52741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 3 Jul 2012 11:24:32 +0000 Subject: [PATCH] fix submodule option OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm?expand=0&rev=47 --- obs-service-tar_scm.changes | 5 +++++ tar_scm | 9 +++++---- tar_scm.service | 5 +++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/obs-service-tar_scm.changes b/obs-service-tar_scm.changes index b24c2b2..550b340 100644 --- a/obs-service-tar_scm.changes +++ b/obs-service-tar_scm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 3 11:23:12 UTC 2012 - adrian@suse.de + +- fix option for submodule update + ------------------------------------------------------------------- Sat Jun 30 13:56:51 UTC 2012 - magist3r@gmail.com diff --git a/tar_scm b/tar_scm index 6f1a7e6..2121199 100644 --- a/tar_scm +++ b/tar_scm @@ -21,7 +21,7 @@ set_default_params () { MYFILENAME="" MYREVISION="" MYPACKAGEMETA="" - USE_GIT_SUBMODULE=true + USE_SUBMODULES=enable # MYHISTORYDEPTH="" INCLUDES="" } @@ -92,8 +92,9 @@ parse_params () { echo "history-depth parameter is obsolete and will be ignored" shift ;; - *-disable-git-submodule) - USE_GIT_SUBMODULE=false + *-submodules) + USE_SUBMODULES="$2" + shift ;; *) echo "Unknown parameter: $1" @@ -245,7 +246,7 @@ initial_clone () { git) # Clone with full depth; so that the revision can be found if specified safe_run git clone "$MYURL" "$CLONE_TO" - if $USE_GIT_SUBMODULE; then + if [ "$USE_SUBMODULES" == "enable" ]; then safe_run cd "$CLONE_TO" safe_run git submodule update --init --recursive safe_run cd .. diff --git a/tar_scm.service b/tar_scm.service index 4bcf0c2..35b7914 100644 --- a/tar_scm.service +++ b/tar_scm.service @@ -44,5 +44,10 @@ Stored history depth. Special value "full" clones/pulls full history. Only valid if SCM git is used. + + Do not include git submodules. + enable + disable +