[pacman-dev] [PATCH] makepkg: more bash-3.2 compatibility

Allan McRae allan at archlinux.org
Fri Feb 4 19:26:20 EST 2011


Adding the "|| true" to the subshell prevents bash-3.2 setting off the
error_trap but requires changing the if statement.

Signed-off-by: Allan McRae <allan at archlinux.org>
---
 scripts/makepkg.sh.in |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 13415fb..001178a 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -507,8 +507,8 @@ download_sources() {
 
 	local netfile
 	for netfile in "${source[@]}"; do
-		local file
-		if file=$(get_filepath "$netfile"); then
+		local file=$(get_filepath "$netfile" || true)
+		if [[ -n "$file" ]]; then
 			msg2 "$(gettext "Found %s")" "${file##*/}"
 			ln -sf "$file" "$srcdir/"
 			continue
-- 
1.7.4



More information about the pacman-dev mailing list