重置仓库到最新一次commit
This commit is contained in:
6
OYO/usr/bin/apt
Executable file
6
OYO/usr/bin/apt
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
source /opt/durapps/transhell/transhell.sh
|
||||
load_transhell
|
||||
|
||||
echo "${TRANSHELL_CONTENT_APT_IS_PROVIDED_BY_OYO} "
|
||||
oyo $@
|
||||
38
OYO/usr/bin/oyo
Normal file
38
OYO/usr/bin/oyo
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /opt/durapps/transhell/transhell.sh
|
||||
load_transhell
|
||||
|
||||
YY_APT_FAST=/opt/durapps/oyo/apt-fast/yy-apt-fast
|
||||
YOYO_GETFASTMIRROR=/opt/durapps/oyo/yoyo-getfastmirror/yoyo-getfastmirror
|
||||
|
||||
function update-apt-fast-conf()
|
||||
{
|
||||
${YOYO_GETFASTMIRROR} getfastmirror
|
||||
local YYGFMR_EXIT_CODE="$?"
|
||||
|
||||
if [ "${YYGFMR_EXIT_CODE}" != "0" ];then
|
||||
echo "${TRANSHELL_CONTENT_FAILED_TO_GET_MIRROR_INFO}"
|
||||
exit ${YYGFMR_EXIT_CODE}
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
}
|
||||
#####没有conf还不是root的就先root下获取conf
|
||||
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
|
||||
update-apt-fast-conf
|
||||
fi
|
||||
##### yyupdate手动操作更新
|
||||
if [ "$1" = "yyupdate" ];then
|
||||
update-apt-fast-conf
|
||||
##### 其他的直接转给apt-fast
|
||||
else
|
||||
${YY_APT_FAST} $@
|
||||
fi
|
||||
3
OYO/usr/share/apt/transhell/apt_en_US.transhell
Normal file
3
OYO/usr/share/apt/transhell/apt_en_US.transhell
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
TRANSHELL_CONTENT_APT_IS_PROVIDED_BY_OYO="Please do not use apt in shell, for in Yoyo OS, apt is provided by oyo."
|
||||
|
||||
3
OYO/usr/share/apt/transhell/apt_zh_CN.transhell
Normal file
3
OYO/usr/share/apt/transhell/apt_zh_CN.transhell
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
TRANSHELL_CONTENT_APT_IS_PROVIDED_BY_OYO="请不要在脚本中使用apt,在Yoyo OS中,apt是由oyo提供的"
|
||||
|
||||
3
OYO/usr/share/oyo/transhell/oyo_en_US.transhell
Normal file
3
OYO/usr/share/oyo/transhell/oyo_en_US.transhell
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
TRANSHELL_CONTENT_FAILED_TO_GET_MIRROR_INFO="E:Failed to get mirror info. Now exit. "
|
||||
TRANSHELL_CONTENT_APT_FAST_CONF_NOT_FOUND_NEED_AUTH_TO_UPDATE="apt-fast.conf can not be found.\nThat might be because it's your first time running oyo after boot up\nWill try to authenticify to run yoyo-getfastmirror"
|
||||
3
OYO/usr/share/oyo/transhell/oyo_zh_CN.transhell
Normal file
3
OYO/usr/share/oyo/transhell/oyo_zh_CN.transhell
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
TRANSHELL_CONTENT_FAILED_TO_GET_MIRROR_INFO="错误:无法获取镜像信息,退出。"
|
||||
TRANSHELL_CONTENT_APT_FAST_CONF_NOT_FOUND_NEED_AUTH_TO_UPDATE="无法找到apt-fast.conf\n这可能是因为这是你开机后第一次使用oyo\n尝试验证来运行 yoyo-getfastmirror"
|
||||
Reference in New Issue
Block a user