Fix decalres

This commit is contained in:
2021-12-03 17:37:00 -05:00
parent 8427c43c4f
commit b814d99a20

View File

@@ -209,7 +209,7 @@ getOS() {
debug "Platform: $ID $VERSION_ID" debug "Platform: $ID $VERSION_ID"
} }
ifSudo() { ifSudo() {
declare -l _user="root" local _user="root"
if [[ $# == 0 ]]; then if [[ $# == 0 ]]; then
[[ "$_exec_user" == "root" ]]; return $? [[ "$_exec_user" == "root" ]]; return $?
elif [[ $# -eq 2 && "$1" == "-u" ]]; then elif [[ $# -eq 2 && "$1" == "-u" ]]; then
@@ -585,7 +585,7 @@ acquireDeb() {
buildRPM() { buildRPM() {
debug "Running: ${FUNCNAME[0]}" debug "Running: ${FUNCNAME[0]}"
declare -l _build_requires _requires local _build_requires _requires _ec
declare -g _mcrpm="$_outputdir/RPMS/x86_64/MediaCenter-$_mcversion.x86_64.rpm" declare -g _mcrpm="$_outputdir/RPMS/x86_64/MediaCenter-$_mcversion.x86_64.rpm"
@@ -699,7 +699,7 @@ 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=$?
[[ "$_ec" == 0 ]] && echo "Build successful. The RPM file is located at: $_mcrpm" [[ "$_ec" == 0 ]] && echo "Build successful. The RPM file is located at: $_mcrpm"
return $_ec return $_ec
} }