From e906e5ab5c07365f3063ea7cd94859f56317db71 Mon Sep 17 00:00:00 2001 From: yutent Date: Sat, 7 Oct 2023 17:58:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=93=E5=8C=85=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + build.sh | 26 ++++++++++++++++++++++++++ debian/control | 15 +++++++++++++++ usr/bin/repo-book | 2 +- 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100755 build.sh create mode 100644 debian/control diff --git a/.gitignore b/.gitignore index 011cfa5..7c9e51a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .vscode ._* +*.deb .Spotlight-V100 .Trashes diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..b8d95f8 --- /dev/null +++ b/build.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +if [ -d unpack ]; then + sudo rm -rf unpack +fi + +version="1.0.3" + +mkdir -p unpack/DEBIAN + +cp debian/control unpack/DEBIAN/ +cp -r usr unpack/ + +cd unpack +find usr -type f | xargs md5sum > DEBIAN/md5sums + +_size=$(du -d 0 usr | cut -f1) + +sed -i "s/{{size}}/${_size}/" DEBIAN/control +sed -i "s/{{version}}/${version}/" DEBIAN/control + +cd .. +sudo chown -R root:root unpack/ +dpkg-deb -b unpack/ "extra-repo-book_${version}.deb" + +sudo rm -rf unpack \ No newline at end of file diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..696566e --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Package: extra-repo-book +Version: {{version}} +Section: repo-book +Architecture: all +Priority: optional +Maintainer: Yutent +Installed-Size: {{size}} +Homepage: https://git.wkit.fun/yutent/extra-repo-book +Author: yutent +Description: 一些额外的开源/闭源应用的软件源管理. + 常用的chrome, edge, mysql等等, 官方已维护了一个源, 这里就没有必要自己再维护一份了, + 故, 做了个简单的脚本, 做一下整合和管理, 这些源. + ` + 声明: 这里只做这些官方源的添加和删除, 并不会对软件本身做任何的修改, 你所安装的软件的来源, 均为官方地址, + 如出现应用损坏或被篡改过, 请自行检查自己本地DNS是否被劫持, 或联系软件开发者. diff --git a/usr/bin/repo-book b/usr/bin/repo-book index bf9818d..81116f0 100755 --- a/usr/bin/repo-book +++ b/usr/bin/repo-book @@ -161,7 +161,7 @@ case "$1" in ;; -v) - echo '1.0.0' + echo '1.0.3' ;; add)