mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 09:20:18 +08:00
sync: fda3f70d5d
This commit is contained in:
@@ -5,12 +5,10 @@ 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
|
dpkg -s "$1" > /dev/null 2>&1
|
||||||
RET="$?"
|
RET="$?"
|
||||||
if [[ "$RET" != "0" ]] && [[ "$IS_ACE_ENV" == "" ]];then ## 如果未在ACE环境中
|
if [[ "$RET" != "0" ]] && [[ "$IS_ACE_ENV" == "" ]];then ## 如果未在ACE环境中
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for ace_entry in "${ACE_ENVIRONMENTS[@]}"; do
|
for ace_entry in "${ACE_ENVIRONMENTS[@]}"; do
|
||||||
ace_cmd=${ace_entry%%:*}
|
ace_cmd=${ace_entry%%:*}
|
||||||
if command -v "$ace_cmd" >/dev/null 2>&1; then
|
if command -v "$ace_cmd" >/dev/null 2>&1; then
|
||||||
@@ -18,11 +16,11 @@ for ace_entry in "${ACE_ENVIRONMENTS[@]}"; do
|
|||||||
echo "正在检查 $ace_cmd 环境的安装..."
|
echo "正在检查 $ace_cmd 环境的安装..."
|
||||||
echo "----------------------------------------"
|
echo "----------------------------------------"
|
||||||
|
|
||||||
# 在ACE环境中执行安装检测
|
# 在ACE环境中使用dpkg -s检查安装状态
|
||||||
$ace_cmd dpkg -l | grep "^ii $1 " > /dev/null
|
# 使用dpkg -s并检查输出中是否包含"Status: install ok installed"
|
||||||
|
$ace_cmd bash -c "dpkg -s '$1' 2>/dev/null | grep -q 'Status: install ok installed'"
|
||||||
try_run_ret="$?"
|
try_run_ret="$?"
|
||||||
|
|
||||||
|
|
||||||
# 最终检测结果处理
|
# 最终检测结果处理
|
||||||
if [ "$try_run_ret" -eq 0 ]; then
|
if [ "$try_run_ret" -eq 0 ]; then
|
||||||
echo "----------------------------------------"
|
echo "----------------------------------------"
|
||||||
|
|||||||
Reference in New Issue
Block a user