File tree Expand file tree Collapse file tree 1 file changed +30
-8
lines changed
Expand file tree Collapse file tree 1 file changed +30
-8
lines changed Original file line number Diff line number Diff line change 126126
127127# default args
128128OR_INSTALLER_ARGS=" "
129+ # default option
130+ option=" all"
129131
130132# default values, can be overwritten by cmdline args
131133while [ " $# " -gt 0 ]; do
@@ -135,9 +137,17 @@ while [ "$#" -gt 0 ]; do
135137 ;;
136138 -base)
137139 OR_INSTALLER_ARGS=" ${OR_INSTALLER_ARGS} -base"
140+ if [[ " ${option} " != " all" ]]; then
141+ echo " WARNING: previous argument -${option} will be overwritten with -base." >&2
142+ fi
143+ option=" base"
138144 ;;
139145 -common)
140146 OR_INSTALLER_ARGS=" ${OR_INSTALLER_ARGS} -common"
147+ if [[ " ${option} " != " all" ]]; then
148+ echo " WARNING: previous argument -${option} will be overwritten with -common." >&2
149+ fi
150+ option=" common"
141151 ;;
142152 -local)
143153 OR_INSTALLER_ARGS=" ${OR_INSTALLER_ARGS} -local"
@@ -178,21 +188,33 @@ esac
178188case " ${os} " in
179189 " CentOS Linux" )
180190 _installORDependencies
181- _installCentosPackages
182- _installCommon
183- _installCentosCleanUp
191+ if [[ " ${option} " == " base" || " ${option} " == " all" ]]; then
192+ _installCentosPackages
193+ _installCentosCleanUp
194+ fi
195+ if [[ " ${option} " == " common" || " ${option} " == " all" ]]; then
196+ _installCommon
197+ fi
184198 ;;
185199 " Ubuntu" )
186200 version=$( awk -F= ' /^VERSION_ID/{print $2}' /etc/os-release | sed ' s/"//g' )
187201 _installORDependencies
188- _installUbuntuPackages " ${version} "
189- _installCommon
190- _installUbuntuCleanUp
202+ if [[ " ${option} " == " base" || " ${option} " == " all" ]]; then
203+ _installUbuntuPackages " ${version} "
204+ _installUbuntuCleanUp
205+ fi
206+ if [[ " ${option} " == " common" || " ${option} " == " all" ]]; then
207+ _installCommon
208+ fi
191209 ;;
192210 " Darwin" )
193211 _installORDependencies
194- _installDarwinPackages
195- _installCommon
212+ if [[ " ${option} " == " base" || " ${option} " == " all" ]]; then
213+ _installDarwinPackages
214+ fi
215+ if [[ " ${option} " == " common" || " ${option} " == " all" ]]; then
216+ _installCommon
217+ fi
196218 ;;
197219 * )
198220 echo " unsupported system: ${os} " >&2
You can’t perform that action at this time.
0 commit comments