mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 09:20:18 +08:00
修复:安装状态判断错误的问题
This commit is contained in:
@@ -5,7 +5,7 @@ readonly ACE_ENVIRONMENTS=(
|
|||||||
"deepin23-run:amber-ce-deepin23"
|
"deepin23-run:amber-ce-deepin23"
|
||||||
"sid-run:amber-ce-sid"
|
"sid-run:amber-ce-sid"
|
||||||
)
|
)
|
||||||
dpkg -s "$1" > /dev/null 2>&1
|
dpkg -s '$1' 2>/dev/null | grep -q 'Status: install ok installed' > /dev/null 2>&1
|
||||||
RET="$?"
|
RET="$?"
|
||||||
if [[ "$RET" != "0" ]] && [[ "$IS_ACE_ENV" == "" ]];then ## 如果未在ACE环境中
|
if [[ "$RET" != "0" ]] && [[ "$IS_ACE_ENV" == "" ]];then ## 如果未在ACE环境中
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ if [[ "$RET" != "0" ]] && [[ "$IS_ACE_ENV" == "" ]];then ## 如果未在ACE环
|
|||||||
|
|
||||||
# 在ACE环境中使用dpkg -s检查安装状态
|
# 在ACE环境中使用dpkg -s检查安装状态
|
||||||
# 使用dpkg -s并检查输出中是否包含"Status: install ok installed"
|
# 使用dpkg -s并检查输出中是否包含"Status: install ok installed"
|
||||||
$ace_cmd bash -c "dpkg -s '$1' 2>/dev/null | grep -q 'Status: install ok installed'"
|
$ace_cmd dpkg -s "$1" 2>/dev/null | grep -q 'Status: install ok installed'
|
||||||
try_run_ret="$?"
|
try_run_ret="$?"
|
||||||
|
|
||||||
# 最终检测结果处理
|
# 最终检测结果处理
|
||||||
|
|||||||
Reference in New Issue
Block a user