mirror of
https://gitee.com/spark-store-project/uos-packaging-tools
synced 2025-12-13 18:42:07 +08:00
支持file://协议
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
Package: uos-packaging-tools
|
Package: uos-packaging-tools
|
||||||
Version: 1.0.3
|
Version: 1.0.4
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Maintainer: shenmo<shenmo@spark-app.store>
|
Maintainer: shenmo<shenmo@spark-app.store>
|
||||||
Installed-Size: 10
|
Installed-Size: 10
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ fi
|
|||||||
|
|
||||||
for deb_file in "$@"
|
for deb_file in "$@"
|
||||||
do
|
do
|
||||||
|
|
||||||
|
if [[ $deb_file == file://* ]]; then
|
||||||
|
# 如果是,移除 'file://' 部分并输出结果
|
||||||
|
deb_file="${deb_file#file://}"
|
||||||
|
fi
|
||||||
cd "$(dirname "$deb_file")"
|
cd "$(dirname "$deb_file")"
|
||||||
|
|
||||||
# 获取deb包的包名和架构
|
# 获取deb包的包名和架构
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ unpack_package() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
|
if [[ $arg == file://* ]]; then
|
||||||
|
# 如果是,移除 'file://' 部分并输出结果
|
||||||
|
arg="${arg#file://}"
|
||||||
|
fi
|
||||||
unpack_package "$arg"
|
unpack_package "$arg"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,12 @@ if [ -e /usr/local/bin/ssaudit ];then
|
|||||||
|
|
||||||
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 "正在使用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
|
||||||
/usr/local/bin/ssaudit "$DEBPATH"
|
/usr/local/bin/ssaudit "$DEBPATH"
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ OUTPATH=""
|
|||||||
|
|
||||||
for DEBPATH in "$@"
|
for DEBPATH in "$@"
|
||||||
do
|
do
|
||||||
|
if [[ $DEBPATH == file://* ]]; then
|
||||||
|
# 如果是,移除 '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"
|
||||||
|
|||||||
Reference in New Issue
Block a user