Refactor to improve messaging
This commit is contained in:
@@ -691,6 +691,9 @@ buildRPM() {
|
|||||||
else
|
else
|
||||||
rpmbuild --quiet --define="%_topdir $_outputdir" --define="%_libdir /usr/lib" -bb "$_outputdir/SPECS/mediacenter.spec" > /dev/null 2>&1
|
rpmbuild --quiet --define="%_topdir $_outputdir" --define="%_libdir /usr/lib" -bb "$_outputdir/SPECS/mediacenter.spec" > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
declare -l _ec=$?
|
||||||
|
[[ "$_ec" == 0 ]] && echo "Build successful. The RPM file is located at: $_mcrpm"
|
||||||
|
return $_ec
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1303,10 +1306,7 @@ main() {
|
|||||||
# Build RPM from source deb package
|
# Build RPM from source deb package
|
||||||
if [[ -v _build ]]; then
|
if [[ -v _build ]]; then
|
||||||
acquireDeb
|
acquireDeb
|
||||||
if buildRPM; then
|
if ! buildRPM; then
|
||||||
echo "Build Successful."
|
|
||||||
echo "The RPM file is located at: $_mcrpm"
|
|
||||||
else
|
|
||||||
err "Build failed."
|
err "Build failed."
|
||||||
# In case this is automated, let's remove the source DEB and reaquire
|
# In case this is automated, let's remove the source DEB and reaquire
|
||||||
# it on next run in case it is corrupted or buggy
|
# it on next run in case it is corrupted or buggy
|
||||||
|
|||||||
Reference in New Issue
Block a user