[arch-projects] [ABS] [PATCH v2 4/7] vcs prototypes: consistent coding style
Some vcs prototypes do cd repo && update while others do it like cd repo update to update an existing repo. It makes sense to have them all do it the first way (there's nothing wrong with it, and it has better form). Signed-off-by: Linus Arver <linusarver@gmail.com> --- prototypes/PKGBUILD-cvs.proto | 3 +-- prototypes/PKGBUILD-darcs.proto | 3 +-- prototypes/PKGBUILD-hg.proto | 3 +-- prototypes/PKGBUILD-svn.proto | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/prototypes/PKGBUILD-cvs.proto b/prototypes/PKGBUILD-cvs.proto index ea12d69..ea29f43 100644 --- a/prototypes/PKGBUILD-cvs.proto +++ b/prototypes/PKGBUILD-cvs.proto @@ -35,8 +35,7 @@ build() { msg "Connecting to $_cvsmod.sourceforge.net CVS server...." if [[ -d "$_cvsmod/CVS" ]]; then - cd "$_cvsmod" - cvs -z3 update -d + cd "$_cvsmod" && cvs -z3 update -d cd .. else cvs -z3 -d "$_cvsroot" co -D "$pkgver" -f "$_cvsmod" diff --git a/prototypes/PKGBUILD-darcs.proto b/prototypes/PKGBUILD-darcs.proto index 7f0fd66..7fbc1cb 100644 --- a/prototypes/PKGBUILD-darcs.proto +++ b/prototypes/PKGBUILD-darcs.proto @@ -36,8 +36,7 @@ build() { if [[ -d "$_darcsmod/_darcs" ]]; then msg "Retrieving missing patches" - cd "$_darcsmod" - darcs pull -a "$_darcstrunk/$_darcsmod" + cd "$_darcsmod" && darcs pull -a "$_darcstrunk/$_darcsmod" cd .. else msg "Retrieving complete sources" diff --git a/prototypes/PKGBUILD-hg.proto b/prototypes/PKGBUILD-hg.proto index 77d499d..10b2cd1 100644 --- a/prototypes/PKGBUILD-hg.proto +++ b/prototypes/PKGBUILD-hg.proto @@ -35,8 +35,7 @@ build() { msg "Connecting to Mercurial server...." if [[ -d "$_hgrepo" ]]; then - cd "$_hgrepo" - hg pull -u + cd "$_hgrepo" && hg pull -u msg "The local files are updated." cd .. else diff --git a/prototypes/PKGBUILD-svn.proto b/prototypes/PKGBUILD-svn.proto index 64b23c4..6f5a825 100644 --- a/prototypes/PKGBUILD-svn.proto +++ b/prototypes/PKGBUILD-svn.proto @@ -35,7 +35,7 @@ build() { msg "Connecting to SVN server...." if [[ -d "$_svnmod/.svn" ]]; then - (cd "$_svnmod" && svn up -r "$pkgver") + cd "$_svnmod" && svn up -r "$pkgver" cd .. else svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod" -- 1.7.7.2
participants (1)
-
Linus Arver