不再替换apt

This commit is contained in:
shenmo 2023-01-30 16:12:40 +08:00
parent 688d1a38db
commit 6cc7b4254e
5 changed files with 6 additions and 5 deletions
OYO
DEBIAN
opt/durapps/oyo
usr/bin

@ -7,7 +7,4 @@ Depends: curl,transhell
Description: Aptss for Yoyo OS
Architecture: amd64
Homepage: https://gitee.com/spark-community-works-collections/oyo
Provides: apt(=2.4.8)
Conflicts: apt
Replaces: apt
Priority: important

2
OYO/DEBIAN/postinst Executable file

@ -0,0 +1,2 @@
#!/bin/bash
ln -sf /opt/durapps/oyo/apt /usr/local/bin/apt

2
OYO/DEBIAN/postrm Executable file

@ -0,0 +1,2 @@
#!/bin/bash
rm -f /opt/durapps/oyo/apt /usr/local/bin/apt

4
OYO/usr/bin/oyo Normal file → Executable file

@ -19,14 +19,14 @@ fi
apt-get update
}
#####没有conf还不是root的就先root下获取conf
if [ ! -e /tmp/oyo/apt-fast.conf] && [ "$(id -u)" != "0" ];then
if [ ! -e /tmp/oyo/apt-fast.conf ] && [ "$(id -u)" != "0" ];then
echo -e "${TRANSHELL_CONTENT_APT_FAST_CONF_NOT_FOUND_NEED_AUTH_TO_UPDATE}"
pkexec $0 $@
exit
fi
##### 没有conf的获取conf再进行操作
if [ ! -e /tmp/oyo/apt-fast.conf];then
if [ ! -e /tmp/oyo/apt-fast.conf ];then
update-apt-fast-conf
fi
##### yyupdate手动操作更新