diff --git a/update_keyring.sh b/update_keyring.sh new file mode 100755 index 0000000..70e85a4 --- /dev/null +++ b/update_keyring.sh @@ -0,0 +1,20 @@ +#!/bin/bash + + +echo "下载docker公钥..." + +wget -qO - "https://download.docker.com/linux/debian/gpg" | gpg \ + --dearmor | tee \ + "usr/share/extra-repo-book/trusted.gpg.d/docker.gpg" > /dev/null + +echo "完成" + + +echo "下载microsoft公钥..." + +wget -qO - "https://packages.microsoft.com/keys/microsoft.asc" | gpg \ + --dearmor | tee \ + "usr/share/extra-repo-book/trusted.gpg.d/ms.gpg" > /dev/null + +echo "完成" + diff --git a/usr/bin/repo-book b/usr/bin/repo-book index 0e5ede6..0dbe89e 100755 --- a/usr/bin/repo-book +++ b/usr/bin/repo-book @@ -39,7 +39,7 @@ function add_repo () { chrome) echo '正在添加chrome源...' echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/chrome.list > /dev/null - sudo cp /usr/lib/extra-repo-book/trusted.gpg.d/google.gpg /etc/apt/trusted.gpg.d/ + sudo cp /usr/share/extra-repo-book/trusted.gpg.d/google-chrome.gpg /etc/apt/trusted.gpg.d/ read -p "添加完成, 是否更新索引? y/n: " action if [[ "$action" == "" || "$action" == "y" ]]; then sudo apt update @@ -48,7 +48,7 @@ function add_repo () { edge) echo '正在添加edge源...' echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge/ stable main" | sudo tee /etc/apt/sources.list.d/edge.list > /dev/null - sudo cp /usr/lib/extra-repo-book/trusted.gpg.d/microsoft.gpg /etc/apt/trusted.gpg.d/ + sudo cp /usr/share/extra-repo-book/trusted.gpg.d/microsoft.gpg /etc/apt/trusted.gpg.d/ read -p "添加完成, 是否更新索引? y/n: " action if [[ "$action" == "" || "$action" == "y" ]]; then sudo apt update @@ -57,7 +57,7 @@ function add_repo () { vscode) echo '正在添加vscode源...' echo "deb [arch=amd64] http://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null - sudo cp /usr/lib/extra-repo-book/trusted.gpg.d/microsoft.gpg /etc/apt/trusted.gpg.d/ + sudo cp /usr/share/extra-repo-book/trusted.gpg.d/microsoft.gpg /etc/apt/trusted.gpg.d/ read -p "添加完成, 是否更新索引? y/n: " action if [[ "$action" == "" || "$action" == "y" ]]; then sudo apt update @@ -68,7 +68,7 @@ function add_repo () { echo "deb [arch=amd64] http://repo.mysql.com/apt/debian/ ${codename} mysql-8.0" | sudo tee /etc/apt/sources.list.d/mysql.list > /dev/null echo "deb [arch=amd64] http://repo.mysql.com/apt/debian/ ${codename} mysql-tools" | sudo tee -a /etc/apt/sources.list.d/mysql.list > /dev/null - sudo cp /usr/lib/extra-repo-book/trusted.gpg.d/mysql.gpg /etc/apt/trusted.gpg.d/ + sudo cp /usr/share/extra-repo-book/trusted.gpg.d/mysql.gpg /etc/apt/trusted.gpg.d/ read -p "添加完成, 是否更新索引? y/n: " action if [[ "$action" == "" || "$action" == "y" ]]; then @@ -79,7 +79,7 @@ function add_repo () { echo '正在添加docker源...' echo "deb [arch=${archname}] https://download.docker.com/linux/debian ${codename} stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null - sudo cp /usr/lib/extra-repo-book/trusted.gpg.d/docker.gpg /etc/apt/trusted.gpg.d/ + sudo cp /usr/share/extra-repo-book/trusted.gpg.d/docker.gpg /etc/apt/trusted.gpg.d/ read -p "添加完成, 是否更新索引? y/n: " action if [[ "$action" == "" || "$action" == "y" ]]; then sudo apt update @@ -96,7 +96,7 @@ function remove_repo () { chrome) echo '正在删除chrome源...' sudo rm /etc/apt/sources.list.d/chrome.list - sudo rm /etc/apt/trusted.gpg.d/google.gpg + sudo rm /etc/apt/trusted.gpg.d/google-chrome.gpg read -p "删除完成, 是否更新索引? y/n: " action if [[ "$action" == "" || "$action" == "y" ]]; then sudo apt update diff --git a/usr/lib/extra-repo-book/trusted.gpg.d/google.gpg b/usr/lib/extra-repo-book/trusted.gpg.d/google.gpg deleted file mode 100644 index 497a9aa..0000000 Binary files a/usr/lib/extra-repo-book/trusted.gpg.d/google.gpg and /dev/null differ diff --git a/usr/lib/extra-repo-book/trusted.gpg.d/docker.gpg b/usr/share/extra-repo-book/trusted.gpg.d/docker.gpg similarity index 100% rename from usr/lib/extra-repo-book/trusted.gpg.d/docker.gpg rename to usr/share/extra-repo-book/trusted.gpg.d/docker.gpg diff --git a/usr/share/extra-repo-book/trusted.gpg.d/google-chrome.gpg b/usr/share/extra-repo-book/trusted.gpg.d/google-chrome.gpg new file mode 100644 index 0000000..52b2b5e Binary files /dev/null and b/usr/share/extra-repo-book/trusted.gpg.d/google-chrome.gpg differ diff --git a/usr/lib/extra-repo-book/trusted.gpg.d/microsoft.gpg b/usr/share/extra-repo-book/trusted.gpg.d/microsoft.gpg similarity index 100% rename from usr/lib/extra-repo-book/trusted.gpg.d/microsoft.gpg rename to usr/share/extra-repo-book/trusted.gpg.d/microsoft.gpg diff --git a/usr/lib/extra-repo-book/trusted.gpg.d/mysql.gpg b/usr/share/extra-repo-book/trusted.gpg.d/mysql.gpg similarity index 100% rename from usr/lib/extra-repo-book/trusted.gpg.d/mysql.gpg rename to usr/share/extra-repo-book/trusted.gpg.d/mysql.gpg