This commit is contained in:
shenmo 2023-07-24 01:01:34 +08:00
parent eb6984a9d1
commit 02e21e40c3
4 changed files with 11 additions and 12 deletions

View File

@ -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包的包名和架构

View File

@ -14,10 +14,9 @@ unpack_package() {
}
for arg in "$@"; do
if [[ $arg == file://* ]]; then
# 如果是,移除 'file://' 部分并输出结果
arg="${arg#file://}"
fi
unpack_package "$arg"
done

View File

@ -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

View File

@ -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"