diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-04-13 22:25:39 +0200 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-04-13 22:25:39 +0200 |
commit | 5ebd3565e58ce30f91bbba9ce5f25871dddcd2e8 (patch) | |
tree | 3f09c36763ad76449ccf63073249f64022da00f9 /src/core/libs/lib-software.sh | |
parent | 46d707eb42974cd9c43af7301b801aa27491f30d (diff) |
introduce (var_)TARGET_PACKAGES_EXCLUDE parameters + TARGET_GROUPS incorrect var fix
Diffstat (limited to 'src/core/libs/lib-software.sh')
-rw-r--r-- | src/core/libs/lib-software.sh | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/core/libs/lib-software.sh b/src/core/libs/lib-software.sh index 384cab4..c378577 100644 --- a/src/core/libs/lib-software.sh +++ b/src/core/libs/lib-software.sh @@ -22,8 +22,21 @@ run_mkinitcpio() # installpkg(). taken from setup. modified bigtime # performs package installation to the target system installpkg() { - ALL_PACKAGES=$var_TARGET_PACKAGES - [ -n "$TARGET_GROUPS" ] && ALL_PACKAGES="$ALL_PACKAGES "`list_packages group "$TARGET_GROUPS" | awk '{print $2}'` + ALL_PACKAGES= + [ -n "$var_TARGET_GROUPS" ] && ALL_PACKAGES=`list_packages group "$var_TARGET_GROUPS" | awk '{print $2}'` + if [ -n "$var_TARGET_PACKAGES_EXCLUDE" ] + then + for excl in $var_TARGET_PACKAGES_EXCLUDE + do + ALL_PACKAGES=${ALL_PACKAGES//$excl/} + done + fi + + if [ -n "$var_TARGET_PACKAGES" ] + then + [ -n "$ALL_PACKAGES" ] && ALL_PACKAGES="$ALL_PACKAGES $var_TARGET_PACKAGES" + [ -z "$ALL_PACKAGES" ] && ALL_PACKAGES=$var_TARGET_PACKAGES + fi ALL_PACKAGES=`echo $ALL_PACKAGES` [ -z "$ALL_PACKAGES" ] && die_error "No packages/groups specified to install" |