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 12-26-2010, 11:12 PM
Dave Reisner
 
Default makepkg: escape closing bash array paren for awk

The closing parenthesis of bash arrays needs to be escaped in the ending
address of awk expressions in order to play nicely with implementations
of awk other than gawk. This change provides compatibility with gawk,
nawk and mawk.

Signed-off-by: Dave Reisner <d@falconindy.com>
---
scripts/makepkg.sh.in | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 1996dd4..d9d8aa8 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1223,7 +1223,7 @@ check_sanity() {
fi

local provides_list
- eval $(awk '/^[[:space:]]*provides=/,/)/' "$BUILDFILE" | sed "s/provides=/provides_list+=/")
+ eval $(awk '/^[[:space:]]*provides=/,/)/' "$BUILDFILE" | sed "s/provides=/provides_list+=/")
for i in ${provides_list[@]}; do
if [[ $i != ${i//</} || $i != ${i//>/} ]]; then
error "$(gettext "Provides array cannot contain comparison (< or >) operators.")"
@@ -1232,7 +1232,7 @@ check_sanity() {
done

local backup_list
- eval $(awk '/^[[:space:]]*backup=/,/)/' "$BUILDFILE" | sed "s/backup=/backup_list+=/")
+ eval $(awk '/^[[:space:]]*backup=/,/)/' "$BUILDFILE" | sed "s/backup=/backup_list+=/")
for i in "${backup_list[@]}"; do
if [[ ${i:0:1} = "/" ]]; then
error "$(gettext "Backup entry should not contain leading slash : %s")" "$i"
@@ -1241,7 +1241,7 @@ check_sanity() {
done

local optdepends_list
- eval $(awk '/^[[:space:]]*optdepends=/,/)/' "$BUILDFILE" | sed "s/optdepends=/optdepends_list+=/")
+ eval $(awk '/^[[:space:]]*optdepends=/,/)/' "$BUILDFILE" | sed "s/optdepends=/optdepends_list+=/")
for i in "${optdepends_list[@]}"; do
local pkg=${i%%:*}
if [[ ! $pkg =~ ^[[:alnum:]><=.+\_-]+$ ]]; then
@@ -1264,7 +1264,7 @@ check_sanity() {

local valid_options=1
local known kopt options_list
- eval $(awk '/^[[:space:]]*options=/,/)/' "$BUILDFILE" | sed "s/options=/options_list+=/")
+ eval $(awk '/^[[:space:]]*options=/,/)/' "$BUILDFILE" | sed "s/options=/options_list+=/")
for i in ${options_list[@]}; do
known=0
# check if option matches a known option or its inverse
--
1.7.3.4
 

Thread Tools




All times are GMT. The time now is 02:12 PM.

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