diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-03-16 05:11:25 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-03-16 05:11:25 +0000 |
commit | 8707f2c165af4db2b6fe5c20a6226128d3e71fdc (patch) | |
tree | 15b77b73ed5416d90f2e0e1b4f3f3488b0e4f809 | |
parent | 4abe1ab1650a86538d7fcf74ca2c1688b40fa6f9 (diff) | |
download | portage-8707f2c165af4db2b6fe5c20a6226128d3e71fdc.tar.gz portage-8707f2c165af4db2b6fe5c20a6226128d3e71fdc.tar.bz2 portage-8707f2c165af4db2b6fe5c20a6226128d3e71fdc.zip |
touchup some more misc bits of bash code
svn path=/main/trunk/; revision=2905
-rwxr-xr-x | bin/ebuild.sh | 27 |
1 files 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. |