瀏覽代碼

Fix decalres

bryan 2 年之前
父節點
當前提交
b814d99a20
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      installJRMC

+ 3 - 3
installJRMC

@@ -209,7 +209,7 @@ getOS() {
     debug "Platform: $ID $VERSION_ID"
 }
 ifSudo() {
-    declare -l _user="root"
+    local _user="root"
     if [[ $# == 0 ]]; then
         [[ "$_exec_user" == "root" ]]; return $?
     elif [[ $# -eq 2 && "$1" == "-u" ]]; then
@@ -585,7 +585,7 @@ acquireDeb() {
 buildRPM() {
     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"
 
@@ -699,7 +699,7 @@ buildRPM() {
     else
         rpmbuild --quiet --define="%_topdir $_outputdir" --define="%_libdir /usr/lib" -bb "$_outputdir/SPECS/mediacenter.spec" > /dev/null 2>&1
     fi
-    declare -l _ec=$?
+    _ec=$?
     [[ "$_ec" == 0 ]] && echo "Build successful. The RPM file is located at: $_mcrpm"
     return $_ec
 }