FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 03-12-2012, 07:42 PM
Matthew Monaco
 
Default makepkg: devel_check(): cleanup for hg version

From: Matthew Monaco <matthew.monaco@0x01b.net>

Use pushd/popd, quote args, handle some more errors
---
scripts/makepkg.sh.in | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 11de2b7..0169bbf 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1763,8 +1763,7 @@ devel_check() {
newpkgver=$(bzr revno ${_bzrtrunk})
;;
hg)
- if [[ -d ./src/$_hgrepo ]] ; then
- cd ./src/$_hgrepo
+ if pushd "./src/$_hgrepo" > /dev/null; then
local ret=0
hg pull || ret=$?
if (( ! ret )); then
@@ -1774,11 +1773,14 @@ devel_check() {
fi
else
[[ ! -d ./src/ ]] && mkdir ./src/
- hg clone $_hgroot/$_hgrepo ./src/$_hgrepo
- cd ./src/$_hgrepo
+ hg clone "$_hgroot/$_hgrepo" "./src/$_hgrepo"
+ if ! pushd "./src/$_hgrepo" > /dev/null; then
+ warning "$(gettext "An error occured while determining the hg version number.")"
+ return 0
+ fi
fi
newpkgver=$(hg tip --template "{rev}")
- cd ../../
+ popd > /dev/null
;;
esac

--
1.7.9.3
 
Old 03-13-2012, 12:14 AM
Matthew Monaco
 
Default makepkg: devel_check(): cleanup for hg version

From: Matthew Monaco <matthew.monaco@0x01b.net>

Use pushd/popd, quote args, handle some more errors
---
scripts/makepkg.sh.in | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 5dcaf60..98e9a5a 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1754,8 +1754,7 @@ devel_check() {
newpkgver=$(bzr revno ${_bzrtrunk})
;;
hg)
- if [[ -d ./src/$_hgrepo ]] ; then
- cd ./src/$_hgrepo
+ if pushd "./src/$_hgrepo" > /dev/null; then
local ret=0
hg pull || ret=$?
if (( ! ret )); then
@@ -1765,11 +1764,14 @@ devel_check() {
fi
else
[[ ! -d ./src/ ]] && mkdir ./src/
- hg clone $_hgroot/$_hgrepo ./src/$_hgrepo
- cd ./src/$_hgrepo
+ hg clone "$_hgroot/$_hgrepo" "./src/$_hgrepo"
+ if ! pushd "./src/$_hgrepo" > /dev/null; then
+ warning "$(gettext "An error occured while determining the hg version number.")"
+ return 0
+ fi
fi
newpkgver=$(hg tip --template "{rev}")
- cd ../../
+ popd > /dev/null
;;
esac

--
1.7.9.3
 

Thread Tools




All times are GMT. The time now is 08:51 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org