summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-02-13 10:12:39 -0600
committerDan McGee <dan@archlinux.org>2012-02-13 10:14:06 -0600
commitc7321a7b80aebeacb05ad5ab9d096779403b1758 (patch)
tree8fa7f16abc7b7af0c24ba92ababfc5c145d35eed /scripts/makepkg.sh.in
parent115c0381c235100d7b05d9751767017a9ee325c4 (diff)
parentb4f5a63e7fee5d04949e290bd63e5f0e94bd211e (diff)
downloadpacman-c7321a7b80aebeacb05ad5ab9d096779403b1758.tar.xz
Merge branch 'maint'
Conflicts: lib/libalpm/sync.c src/util/pactree.c
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in13
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index ba96e843..f0a22529 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1739,8 +1739,13 @@ devel_check() {
msg "$(gettext "Determining latest %s revision...")" 'hg'
if [[ -d ./src/$_hgrepo ]] ; then
cd ./src/$_hgrepo
- hg pull
- hg update
+ local ret=0
+ hg pull || ret=$?
+ if (( ! ret )); then
+ hg update
+ elif (( ret != 1 )); then
+ return 1
+ fi
else
[[ ! -d ./src/ ]] && mkdir ./src/
hg clone $_hgroot/$_hgrepo ./src/$_hgrepo
@@ -2112,7 +2117,9 @@ if [[ ! -f $BUILDFILE ]]; then
else
# PKGBUILD passed through a pipe
BUILDFILE=/dev/stdin
+ shopt -u extglob
source "$BUILDFILE"
+ shopt -s extglob
fi
else
crlftest=$(file "$BUILDFILE" | grep -F 'CRLF' || true)
@@ -2124,7 +2131,9 @@ else
if [[ ${BUILDFILE:0:1} != "/" ]]; then
BUILDFILE="$startdir/$BUILDFILE"
fi
+ shopt -u extglob
source "$BUILDFILE"
+ shopt -s extglob
fi
# set defaults if they weren't specified in buildfile