Modify append_data to die on 0 arguments and check arg 2 with isTrue(). Based on a patch from robbat2

cleanup-cruft
Andrew Gaffney 16 years ago
parent 694eaf7f39
commit f446ceb0e9

@ -2,6 +2,10 @@
# Copyright 1999-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS)
# Distributed under the GPL v2
06 Mar 2009; Andrew Gaffney <agaffney@gentoo.org> gen_initramfs.sh:
Modify append_data to die on 0 arguments and check arg 2 with isTrue().
Based on a patch from robbat2
20 Feb 2009; Andrew Gaffney <agaffney@gentoo.org> arch/sparc64/config.sh,
gen_compile.sh, gen_funcs.sh, gen_package.sh:
Add support for multiple possible kernel binary paths for gentoo bug

@ -561,7 +561,8 @@ append_data() {
local name=$1 var=$2
local func="append_${name}"
if [ $# -eq 1 ] || [ ${var} -eq 1 ]
[ $# -eq 0 ] && gen_die "append_data() called with zero arguments"
if [ $# -eq 1 ] || isTrue ${var}
then
print_info 1 " >> Appending ${name} cpio data..."
${func}

Loading…
Cancel
Save