From b0a4ab433cf13dfa1d693bb0151228f6707ecbd9 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 29 Dec 2011 13:13:57 +0100 Subject: [PATCH] generate-svn-snapshot: run svn-buildpackage in subshell and move files to orig dir If we switch the directory we might end up in the wrong directory for further actions, so run all the commands around svn-buildpackage in a subshell. Also replace the --svn-move command with --svn-move-to to place the artifact files in the original directory, otherwise the files might be placed in the wrong directory if $branch is set and used. --- scripts/generate-svn-snapshot | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/generate-svn-snapshot b/scripts/generate-svn-snapshot index d9677b4..a61ef2d 100755 --- a/scripts/generate-svn-snapshot +++ b/scripts/generate-svn-snapshot @@ -128,13 +128,14 @@ cd $ORIG_DIR debian_only="$(svn propget mergeWithUpstream source/${branch:-}/debian)" if [ "${debian_only:-}" = "1" ] ; then - cd "source/${branch:-}" - echo "mergeWithUpstream detected, using svn-buildpackage to create source package" - svn-buildpackage --svn-download-orig -S \ - --svn-builder 'dpkg-buildpackage' -d \ - --svn-move --svn-dont-purge -uc -us \ - --svn-move --svn-ignore-new -rfakeroot - cd .. + ( + cd "source/${branch:-}" + echo "mergeWithUpstream detected, using svn-buildpackage to create source package" + svn-buildpackage --svn-download-orig -S \ + --svn-builder 'dpkg-buildpackage' -d \ + --svn-move-to="${ORIG_DIR}" --svn-dont-purge -uc -us \ + --svn-ignore-new -rfakeroot + ) else dpkg-source --tar-ignore=\.svn -b source/${branch:-} fi