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