@@ -140,7 +140,7 @@ set_collection_url() {
140140 else
141141 package_name=" ${collection} -release-${family}${full_version} .${package_file_suffix} "
142142 fi
143- package_url=" https:// ${repository} /${package_name} "
143+ package_url=" ${repository} /${package_name} "
144144
145145 assigned ' package_name'
146146 assigned ' package_url'
@@ -151,9 +151,14 @@ exec_and_capture() {
151151
152152 info " Executing: ${_cmd} "
153153 local _result
154+
155+ set +e
154156 result=$( ${_cmd} 2>&1 )
155157 local _status=$?
158+ set -e
159+
156160 echo " ${result} "
161+ info " Status: ${_status} "
157162 return $_status
158163}
159164
@@ -191,13 +196,14 @@ install_release_package() {
191196 local _package_type=" $1 "
192197 local _package_file=" $2 "
193198
199+ info " Installing release package: ${_package_file} "
194200 case $_package_type in
195201 rpm)
196- rpm -Uvh " $_package_file "
202+ exec_and_capture rpm -Uvh " $_package_file "
197203 ;;
198204 deb)
199- dpkg -i " $_package_file "
200- apt update
205+ exec_and_capture dpkg -i " $_package_file "
206+ exec_and_capture apt update
201207 ;;
202208 * )
203209 fail " Unhandled package type: '${package_type} '"
@@ -208,14 +214,15 @@ install_release_package() {
208214install_package () {
209215 local _package=" $1 "
210216
217+ info " Installing ${_package} "
211218 if exists ' dnf' ; then
212- dnf install -y " $_package "
219+ exec_and_capture dnf install -y " $_package "
213220 elif exists ' yum' ; then
214- yum install -y " $_package "
221+ exec_and_capture yum install -y " $_package "
215222 elif exists ' zypper' ; then
216- zypper install -y " $_package "
223+ exec_and_capture zypper install -y " $_package "
217224 elif exists ' apt' ; then
218- apt install -y " $_package "
225+ exec_and_capture apt install -y " $_package "
219226 else
220227 fail " Unable to install ${_package} . Neither dnf, yum, zypper, nor apt are installed."
221228 fi
0 commit comments