deleted: README.en.md
modified: README.md new file: uos-self-sign.sh
This commit is contained in:
parent
a2e05fae2e
commit
6bb3d0a32a
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
||||
# UOS免开发者模式安装脚本
|
||||
|
||||
#### Description
|
||||
UOS免开发者模式安装脚本
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
32
README.md
32
README.md
@ -3,35 +3,3 @@
|
||||
#### 介绍
|
||||
UOS免开发者模式安装脚本
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 特技
|
||||
|
||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
|
||||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
|
||||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
|
95
uos-self-sign.sh
Normal file
95
uos-self-sign.sh
Normal file
@ -0,0 +1,95 @@
|
||||
#!/bin/sh
|
||||
reset
|
||||
if [ -f "/usr/bin/deepin-deb-installer" ]
|
||||
then
|
||||
echo "深度软件包安装器已安装,开始检测证书"
|
||||
else
|
||||
echo "未安装深度软件包安装器,拒绝执行"
|
||||
echo "UOS需要深度软件包安装器来认证签名"
|
||||
echo "如果你用的是UOS,你能卸载这玩意说明你已经开了开发者模式......悄悄告诉你,放屁是不用脱裤子的!"
|
||||
echo "如果你用的不是统信系发行版......所以你为什么要打开这个脚本?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f "/usr/share/ca-certificates/deepin/private/priv.crt" ]
|
||||
|
||||
then
|
||||
echo "检测到已经生成过证书,直接跳过询问"
|
||||
|
||||
else
|
||||
|
||||
until [ -f "/usr/bin/cert-tool" ]
|
||||
#强制未安装证书工具的不通过
|
||||
do
|
||||
|
||||
echo "该工具的原理是利用UOS的自签名安装包免开发者的特性,需要您的UOS ID账号和密码,请在使用工具前确保在应用商店中已安装过“证书工具”这个应用"
|
||||
echo "如果没有安装,则无法使用。请确认安装后再进行下一步操作"
|
||||
sleep 3
|
||||
echo "如果你确认已经安装了该应用,请按回车"
|
||||
read renyijian
|
||||
|
||||
#检测是否在说谎签名文件
|
||||
if [ -f "/usr/bin/cert-tool" ]
|
||||
then
|
||||
echo "成功检测到cert-tool存在,开始检测证书\n"
|
||||
else
|
||||
echo "没有检测到该应用,请您再次确认“证书工具”已经安装!"
|
||||
sleep 3
|
||||
clear
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
until [ -f "/usr/share/ca-certificates/deepin/private/priv.crt" ]
|
||||
do
|
||||
echo "没有检测到证书,准备调用证书工具生成证书,请输入您的UOS账号/密码。本脚本不会上传任何信息"
|
||||
echo "请在此行输入您的UOS账号用户名/电话号/邮箱"
|
||||
read account
|
||||
echo "请在此行输入您的UOS账号密码"
|
||||
read passwd
|
||||
echo "即将安装证书,请在弹出的窗口安装"
|
||||
cert-tool -username="$account" -password="$passwd"
|
||||
|
||||
done
|
||||
echo "检测到已经生成过证书,准备签名"
|
||||
|
||||
fi
|
||||
#这个if是判断是否已经有证书
|
||||
|
||||
|
||||
unset account
|
||||
unset passwd
|
||||
unset renyijian
|
||||
|
||||
debpath=""
|
||||
cd /tmp
|
||||
|
||||
until [ -f "$debpath" ]
|
||||
do
|
||||
if [ ! $1 ]
|
||||
then
|
||||
echo "没有检测到参数,以交互式安装运行"
|
||||
echo "请输入deb文件的绝对路径或直接拖入deb文件(仅限支持的文件管理器,比如深度文管),结束后回车"
|
||||
read debpath
|
||||
echo "生成的签名过的deb保存在/tmp/signed_deb"
|
||||
else
|
||||
echo "参数存在,直接开始签名\n生成的签名过的deb保存在/tmp/signed_deb"
|
||||
debpath="$1"
|
||||
echo "读取到的deb路径为:$debpath"
|
||||
fi
|
||||
if [ -f "$debpath" ]
|
||||
then
|
||||
echo "文件有效,开始签名"
|
||||
deepin-elf-sign-deb "$debpath"
|
||||
echo "签名结束,启动深度软件包管理器"
|
||||
else
|
||||
echo "路径出错,请确认你输入了正确的路径!"
|
||||
sleep 3
|
||||
clear
|
||||
fi
|
||||
done
|
||||
file_name=$(basename "$debpath")
|
||||
|
||||
deepin-deb-installer "/tmp/signed_deb/$file_name"
|
Loading…
Reference in New Issue
Block a user