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.
remotes/origin/mika/no_changes
Michael Prokop 14 years ago
parent 473bfa06f3
commit b0a4ab433c

@ -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

Loading…
Cancel
Save