Before, some vcs prototypes (bzr, git, hg, svn) cd'ed into the repo directory after a checkout, but not on an initial clone. The cvs/darcs prototypes made it uniform by always going into the repo after the checkout, whether on an initial clone or an update. With this change, we make all vcs prototypes simply not remain in the repo directory after a checkout (whether initial clone or update). Signed-off-by: Linus Arver <linusarver@gmail.com> --- prototypes/PKGBUILD-bzr.proto | 1 + prototypes/PKGBUILD-cvs.proto | 2 +- prototypes/PKGBUILD-darcs.proto | 2 +- prototypes/PKGBUILD-git.proto | 1 + prototypes/PKGBUILD-hg.proto | 1 + prototypes/PKGBUILD-svn.proto | 1 + 6 files changed, 6 insertions(+), 2 deletions(-) diff --git a/prototypes/PKGBUILD-bzr.proto b/prototypes/PKGBUILD-bzr.proto index 81f145f..bca92f1 100644 --- a/prototypes/PKGBUILD-bzr.proto +++ b/prototypes/PKGBUILD-bzr.proto @@ -37,6 +37,7 @@ build() { if [[ -d "$_bzrmod" ]]; then cd "$_bzrmod" && bzr --no-plugins pull "$_bzrtrunk" -r "$pkgver" msg "The local files are updated." + cd .. else bzr --no-plugins branch "$_bzrtrunk" "$_bzrmod" -q -r "$pkgver" fi diff --git a/prototypes/PKGBUILD-cvs.proto b/prototypes/PKGBUILD-cvs.proto index 982c149..5c883bc 100644 --- a/prototypes/PKGBUILD-cvs.proto +++ b/prototypes/PKGBUILD-cvs.proto @@ -37,9 +37,9 @@ build() { if [[ -d "$_cvsmod/CVS" ]]; then cd "$_cvsmod" cvs -z3 update -d + cd .. else cvs -z3 -d "$_cvsroot" co -D "$pkgver" -f "$_cvsmod" - cd "$_cvsmod" fi msg "CVS checkout done or server timeout" diff --git a/prototypes/PKGBUILD-darcs.proto b/prototypes/PKGBUILD-darcs.proto index 979e9b5..28b0c32 100644 --- a/prototypes/PKGBUILD-darcs.proto +++ b/prototypes/PKGBUILD-darcs.proto @@ -38,10 +38,10 @@ build() { msg "Retrieving missing patches" cd "$_darcsmod" darcs pull -a "$_darcstrunk/$_darcsmod" + cd .. else msg "Retrieving complete sources" darcs get --partial --set-scripts-executable "$_darcstrunk/$_darcsmod" - cd "$_darcsmod" fi rm -rf "$srcdir/$_darcsmod-build" diff --git a/prototypes/PKGBUILD-git.proto b/prototypes/PKGBUILD-git.proto index 05b721b..78f3992 100644 --- a/prototypes/PKGBUILD-git.proto +++ b/prototypes/PKGBUILD-git.proto @@ -37,6 +37,7 @@ build() { if [[ -d "$_gitname" ]]; then cd "$_gitname" && git pull origin msg "The local files are updated." + cd .. else git clone "$_gitroot" "$_gitname" fi diff --git a/prototypes/PKGBUILD-hg.proto b/prototypes/PKGBUILD-hg.proto index 8474533..e583142 100644 --- a/prototypes/PKGBUILD-hg.proto +++ b/prototypes/PKGBUILD-hg.proto @@ -38,6 +38,7 @@ build() { cd "$_hgrepo" hg pull -u msg "The local files are updated." + cd .. else hg clone "$_hgroot" "$_hgrepo" fi diff --git a/prototypes/PKGBUILD-svn.proto b/prototypes/PKGBUILD-svn.proto index a08e0e3..2afb533 100644 --- a/prototypes/PKGBUILD-svn.proto +++ b/prototypes/PKGBUILD-svn.proto @@ -36,6 +36,7 @@ build() { if [[ -d "$_svnmod/.svn" ]]; then (cd "$_svnmod" && svn up -r "$pkgver") + cd .. else svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod" fi -- 1.7.7.3