diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-06-14 15:53:13 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-06-14 15:53:13 +0200 |
commit | ce5e976133389eae7d4142b1e8b8501a66c57bf5 (patch) | |
tree | 13f5ea7d64de6d58615b56b0c1d84991ad15f9c6 | |
parent | 8901a7ca7a1fb1432a2a1dc39899e36e030ad315 (diff) | |
download | bin-ce5e976133389eae7d4142b1e8b8501a66c57bf5.zip bin-ce5e976133389eae7d4142b1e8b8501a66c57bf5.tar.gz |
easy_e17.sh: add build_package_list function and real_packages variable
-rwxr-xr-x | easy_e17.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/easy_e17.sh b/easy_e17.sh index ef91428..08d92b9 100755 --- a/easy_e17.sh +++ b/easy_e17.sh @@ -116,6 +116,7 @@ function header () echo " Packages: $packages" if [ "$skip" ]; then echo " Skipping: $skip"; fi if [ "$only" ]; then echo " Only: $only"; fi + echo " Effective: $real_packages" echo if [ -z "$action" ]; then action="MISSING!"; fi echo " Script action: $action" @@ -459,6 +460,26 @@ function parse_args () } +function build_package_list () +{ + real_packages="" + if [ "$only" ]; then + pkgs=$only + else + pkgs=$packages + fi + for pkg in $pkgs; do + found=0 + for not in $skip; do + if [ "$not" == "$pkg" ]; then + found=1 + break + fi + done + [ $found -eq 0 ] && real_packages="$real_packages $pkg" + done +} + # SETUP ############################################################################# function check_script_version () @@ -1071,6 +1092,7 @@ set_title define_os_vars read_config_files parse_args +build_package_list # check for script updates if [ "$action" == "script" ]; then header |