mirror of
https://gitee.com/spark-store-project/uos-packaging-tools
synced 2025-06-09 00:36:00 +08:00
fix-23
This commit is contained in:
parent
eb6984a9d1
commit
02e21e40c3
@ -8,10 +8,8 @@ fi
|
||||
for deb_file in "$@"
|
||||
do
|
||||
|
||||
if [[ $deb_file == file://* ]]; then
|
||||
# 如果是,移除 'file://' 部分并输出结果
|
||||
deb_file="${deb_file#file://}"
|
||||
fi
|
||||
|
||||
cd "$(dirname "$deb_file")"
|
||||
|
||||
# 获取deb包的包名和架构
|
||||
|
@ -14,10 +14,9 @@ unpack_package() {
|
||||
}
|
||||
|
||||
for arg in "$@"; do
|
||||
if [[ $arg == file://* ]]; then
|
||||
# 如果是,移除 'file://' 部分并输出结果
|
||||
|
||||
arg="${arg#file://}"
|
||||
fi
|
||||
|
||||
unpack_package "$arg"
|
||||
done
|
||||
|
||||
|
@ -16,10 +16,9 @@ if [ -e /usr/local/bin/ssaudit ];then
|
||||
for DEBPATH in "$@"
|
||||
do
|
||||
|
||||
if [[ $DEBPATH == file://* ]]; then
|
||||
# 如果是,移除 'file://' 部分并输出结果
|
||||
|
||||
DEBPATH="${DEBPATH#file://}"
|
||||
fi
|
||||
|
||||
|
||||
DEBPATH=$(realpath "$DEBPATH")
|
||||
notify-send "正在使用ssaudit安装 $(dpkg-deb -f "$DEBPATH" Package),请稍候...." -i /usr/share/icons/uos-packaging-tools.png
|
||||
@ -36,6 +35,10 @@ else
|
||||
|
||||
for DEBPATH in "$@"
|
||||
do
|
||||
if [[ $DEBPATH == file://* ]]; then
|
||||
# 如果是,移除 'file://' 部分并输出结果
|
||||
DEBPATH="${DEBPATH#file://}"
|
||||
fi
|
||||
DEBPATH=$(realpath "$DEBPATH")
|
||||
notify-send "正在使用apt安装 $(dpkg-deb -f "$DEBPATH" Package),请稍候...." -i /usr/share/icons/uos-packaging-tools.png
|
||||
apt install "$DEBPATH" --reinstall -y
|
||||
|
@ -5,10 +5,9 @@ OUTPATH=""
|
||||
|
||||
for DEBPATH in "$@"
|
||||
do
|
||||
if [[ $DEBPATH == file://* ]]; then
|
||||
# 如果是,移除 'file://' 部分并输出结果
|
||||
|
||||
DEBPATH="${DEBPATH#file://}"
|
||||
fi
|
||||
|
||||
rm -rf $TMPDIR/unpack-dir
|
||||
mkdir -p "$TMPDIR/unpack-dir"
|
||||
cd "$TMPDIR/unpack-dir"
|
||||
|
Loading…
x
Reference in New Issue
Block a user