Browse code

Default to Core group only if no groups specified

Signed-off-by: Ankit Jain <ajatkj@yahoo.co.in>

Ankit Jain authored on 2019/03/29 23:51:33
Showing 1 changed files
... ...
@@ -30,9 +30,9 @@ if [ -f /etc/dnf/dnf.conf ] && command -v dnf &> /dev/null; then
30 30
 	yum_config=/etc/dnf/dnf.conf
31 31
 	alias yum=dnf
32 32
 fi
33
-install_groups=('Core')
34 33
 # for names with spaces, use double quotes (") as install_groups=('Core' '"Compute Node"')
35
-install_packages=('')
34
+install_groups=()
35
+install_packages=()
36 36
 version=
37 37
 while getopts ":y:p:g:t:h" opt; do
38 38
     case $opt in
... ...
@@ -64,6 +64,11 @@ if [[ -z $name ]]; then
64 64
     usage
65 65
 fi
66 66
 
67
+# default to Core group if not specified otherwise
68
+if [ ${#install_groups[*]} -eq 0 ]; then
69
+   install_groups=('Core')
70
+fi
71
+
67 72
 target=$(mktemp -d --tmpdir $(basename $0).XXXXXX)
68 73
 
69 74
 set -x