OSDN Git Service

[fix] : Fixed SC2086
authorhayao <hayao@fascode.net>
Fri, 18 Jun 2021 14:03:40 +0000 (23:03 +0900)
committerhayao <hayao@fascode.net>
Fri, 18 Jun 2021 14:03:40 +0000 (23:03 +0900)
build.sh

index 72ed601..328fa11 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -301,8 +301,8 @@ check_bool() {
     local _value _variable
     for _variable in "${@}"; do
         msg_debug -n "Checking ${_variable}..."
-        eval ': ${'${_variable}':=""}'
-        _value="$(eval echo '$'${_variable})"
+        eval ": \${${_variable}:=''}"
+        _value="$(eval echo "\$${_variable}")"
         if [[ ! -v "${1}" ]] || [[ "${_value}"  = "" ]]; then
             [[ "${debug}" = true ]] && echo ; msg_error "The variable name ${_variable} is empty." "1"
         elif [[ ! "${_value}" = "true" ]] && [[ ! "${_value}" = "false" ]]; then