From 6cc7b4254efa31845ea0fd0ef7d67fbd1bf4bfd6 Mon Sep 17 00:00:00 2001 From: shenmo <jifengshenmo@outlook.com> Date: Mon, 30 Jan 2023 16:12:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=86=8D=E6=9B=BF=E6=8D=A2apt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OYO/DEBIAN/control | 3 --- OYO/DEBIAN/postinst | 2 ++ OYO/DEBIAN/postrm | 2 ++ OYO/{usr/bin => opt/durapps/oyo}/apt | 0 OYO/usr/bin/oyo | 4 ++-- 5 files changed, 6 insertions(+), 5 deletions(-) create mode 100755 OYO/DEBIAN/postinst create mode 100755 OYO/DEBIAN/postrm rename OYO/{usr/bin => opt/durapps/oyo}/apt (100%) mode change 100644 => 100755 OYO/usr/bin/oyo diff --git a/OYO/DEBIAN/control b/OYO/DEBIAN/control index 3493706..05868d3 100644 --- a/OYO/DEBIAN/control +++ b/OYO/DEBIAN/control @@ -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 diff --git a/OYO/DEBIAN/postinst b/OYO/DEBIAN/postinst new file mode 100755 index 0000000..fd9b389 --- /dev/null +++ b/OYO/DEBIAN/postinst @@ -0,0 +1,2 @@ +#!/bin/bash +ln -sf /opt/durapps/oyo/apt /usr/local/bin/apt diff --git a/OYO/DEBIAN/postrm b/OYO/DEBIAN/postrm new file mode 100755 index 0000000..69e8951 --- /dev/null +++ b/OYO/DEBIAN/postrm @@ -0,0 +1,2 @@ +#!/bin/bash +rm -f /opt/durapps/oyo/apt /usr/local/bin/apt diff --git a/OYO/usr/bin/apt b/OYO/opt/durapps/oyo/apt similarity index 100% rename from OYO/usr/bin/apt rename to OYO/opt/durapps/oyo/apt diff --git a/OYO/usr/bin/oyo b/OYO/usr/bin/oyo old mode 100644 new mode 100755 index a36640f..7db8ee0 --- a/OYO/usr/bin/oyo +++ b/OYO/usr/bin/oyo @@ -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手动操作更新