From 8707f2c165af4db2b6fe5c20a6226128d3e71fdc Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 16 Mar 2006 05:11:25 +0000 Subject: touchup some more misc bits of bash code svn path=/main/trunk/; revision=2905 --- bin/ebuild.sh | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 3f3e14343..165ff67da 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -576,15 +576,14 @@ pkg_nofetch() { [ -z "${SRC_URI}" ] && return echo "!!! The following are listed in SRC_URI for ${PN}:" - for MYFILE in `echo ${SRC_URI}`; do - echo "!!! $MYFILE" + local x + for x in `echo ${SRC_URI}`; do + echo "!!! ${x}" done } src_unpack() { - if [ "${A}" != "" ]; then - unpack ${A} - fi + [[ -n ${A} ]] && unpack ${A} } src_compile() { @@ -642,13 +641,11 @@ pkg_config() { # Used to generate the /lib/cpp and /usr/bin/cc wrappers gen_wrapper() { - cat > $1 << END -#!/bin/sh - -$2 "\$@" -END - - chmod 0755 $1 + cat > "$1" <<-EOF + #!/bin/sh + exec $2 "\$@" + EOF + chmod 0755 "$1" } dyn_setup() { @@ -1009,8 +1006,8 @@ dyn_install() { dyn_preinst() { if [ -z "$IMAGE" ]; then - eerror "${FUNCNAME}: IMAGE is unset" - return 1 + eerror "${FUNCNAME}: IMAGE is unset" + return 1 fi [ "$(type -t pre_pkg_preinst)" == "function" ] && pre_pkg_preinst @@ -1220,7 +1217,7 @@ inherit() { shift done - ECLASS_DEPTH=$(($ECLASS_DEPTH - 1)) + ((--ECLASS_DEPTH)) } # Exports stub functions that call the eclass's functions, thereby making them default. -- cgit v1.2.3-1-g7c22