Try new eval method

This commit is contained in:
2022-01-07 17:12:26 -05:00
parent c63ae42a5f
commit b1eb2a47ac

View File

@@ -475,7 +475,7 @@ installPackage() {
# Install packages from package array # Install packages from package array
if [[ ${#pkg_array[@]} -ge 1 ]]; then if [[ ${#pkg_array[@]} -ge 1 ]]; then
debug "pkg_install ${install_flags[*]} ${pkg_array[*]}" debug "pkg_install ${install_flags[*]} ${pkg_array[*]}"
if DEBUG; then if $DEBUG; then
pkg_install "${install_flags[@]}" "${pkg_array[@]}" pkg_install "${install_flags[@]}" "${pkg_array[@]}"
else else
pkg_install "${install_flags[@]}" "${pkg_array[@]}" &>/dev/null pkg_install "${install_flags[@]}" "${pkg_array[@]}" &>/dev/null
@@ -536,7 +536,7 @@ installMCFromRepo() {
exit 1 exit 1
fi fi
if DEBUG; then if $DEBUG; then
installPackage --nocheck --nogpgcheck "$MCPKG" installPackage --nocheck --nogpgcheck "$MCPKG"
else else
installPackage --nocheck --nogpgcheck "$MCPKG" &>/dev/null installPackage --nocheck --nogpgcheck "$MCPKG" &>/dev/null
@@ -755,7 +755,7 @@ buildRPM() {
echo "Building version $MCVERSION, please wait..." echo "Building version $MCVERSION, please wait..."
rpmbuild_cmd="rpmbuild --define=%_topdir $OUTPUTDIR --define=%_libdir /usr/lib -bb $OUTPUTDIR/SPECS/mediacenter.spec" rpmbuild_cmd="rpmbuild --define=%_topdir $OUTPUTDIR --define=%_libdir /usr/lib -bb $OUTPUTDIR/SPECS/mediacenter.spec"
DEBUG || rpmbuild_cmd+=" &>/dev/null" $DEBUG || rpmbuild_cmd+=" &>/dev/null"
if eval "$rpmbuild_cmd" && [[ -f "$MCRPM" ]] ; then if eval "$rpmbuild_cmd" && [[ -f "$MCRPM" ]] ; then
echo "Build successful. The RPM file is located at: $MCRPM" echo "Build successful. The RPM file is located at: $MCRPM"
else else
@@ -1423,7 +1423,7 @@ uninstall() {
MCPKG="mediacenter$MVERSION" MCPKG="mediacenter$MVERSION"
fi fi
if DEBUG; then if $DEBUG; then
debug "pkg_remove $MCPKG" debug "pkg_remove $MCPKG"
pkg_remove "$MCPKG" pkg_remove "$MCPKG"
else else