Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   makepkg: use parameter expansion instead of basename (http://www.linux-archive.org/archlinux-pacman-development/387918-makepkg-use-parameter-expansion-instead-basename.html)

Andres P 06-18-2010 11:51 PM

makepkg: use parameter expansion instead of basename
 
Signed-off-by: Andres P <aepd87@gmail.com>
---
scripts/makepkg.sh.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index deae2bb..536da30 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -325,7 +325,7 @@ get_downloadclient() {
# ensure specified program is installed
local program="${agent%% *}"
if [[ ! -x $program ]]; then
- local baseprog=$(basename $program)
+ local baseprog="${program##*/}"
error "$(gettext "The download program %s is not installed.")" "$baseprog"
plain "$(gettext "Aborting...")"
exit 1 # $E_MISSING_PROGRAM
--
1.7.1


All times are GMT. The time now is 04:06 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.