mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-07-13 09:02:21 +08:00
40 lines
708 B
Bash
Executable File
40 lines
708 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "Spark Store Audit script.星火商店审核脚本"
|
|
|
|
|
|
#################检测文件是否存在
|
|
if [ $# -eq 0 ];then
|
|
echo "没有接收到参数,退出"
|
|
echo "用法:$0 deb路径"
|
|
exit
|
|
fi
|
|
|
|
if [ ! -f "$1" ]
|
|
then
|
|
echo "文件不存在"
|
|
exit 1
|
|
fi
|
|
|
|
if [ "$(id -u)" != "0" ];then
|
|
#############################无root权限时
|
|
echo "请使用root启动ssaudit"
|
|
exit 1
|
|
fi
|
|
|
|
###
|
|
|
|
|
|
DEBPATH=`realpath $1`
|
|
echo ------------------------------------------------------------
|
|
try_run_output=$(/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh test-install-app $1)
|
|
try_run_ret="$?"
|
|
if [ "$try_run_ret" -ne 0 ];then
|
|
exit $try_run_ret
|
|
fi
|
|
|
|
|
|
dpkg -i "$DEBPATH" || aptss install -yf
|
|
|
|
|