[ -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() {
# 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() {
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
shift
done
- ECLASS_DEPTH=$(($ECLASS_DEPTH - 1))
+ ((--ECLASS_DEPTH))
}
# Exports stub functions that call the eclass's functions, thereby making them default.