更新公钥
parent
ab155e09e3
commit
9caeea373b
|
@ -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 "完成"
|
||||||
|
|
|
@ -39,7 +39,7 @@ function add_repo () {
|
||||||
chrome)
|
chrome)
|
||||||
echo '正在添加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
|
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
|
read -p "添加完成, 是否更新索引? y/n: " action
|
||||||
if [[ "$action" == "" || "$action" == "y" ]]; then
|
if [[ "$action" == "" || "$action" == "y" ]]; then
|
||||||
sudo apt update
|
sudo apt update
|
||||||
|
@ -48,7 +48,7 @@ function add_repo () {
|
||||||
edge)
|
edge)
|
||||||
echo '正在添加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
|
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
|
read -p "添加完成, 是否更新索引? y/n: " action
|
||||||
if [[ "$action" == "" || "$action" == "y" ]]; then
|
if [[ "$action" == "" || "$action" == "y" ]]; then
|
||||||
sudo apt update
|
sudo apt update
|
||||||
|
@ -57,7 +57,7 @@ function add_repo () {
|
||||||
vscode)
|
vscode)
|
||||||
echo '正在添加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
|
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
|
read -p "添加完成, 是否更新索引? y/n: " action
|
||||||
if [[ "$action" == "" || "$action" == "y" ]]; then
|
if [[ "$action" == "" || "$action" == "y" ]]; then
|
||||||
sudo apt update
|
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-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
|
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
|
read -p "添加完成, 是否更新索引? y/n: " action
|
||||||
if [[ "$action" == "" || "$action" == "y" ]]; then
|
if [[ "$action" == "" || "$action" == "y" ]]; then
|
||||||
|
@ -79,7 +79,7 @@ function add_repo () {
|
||||||
echo '正在添加docker源...'
|
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
|
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
|
read -p "添加完成, 是否更新索引? y/n: " action
|
||||||
if [[ "$action" == "" || "$action" == "y" ]]; then
|
if [[ "$action" == "" || "$action" == "y" ]]; then
|
||||||
sudo apt update
|
sudo apt update
|
||||||
|
@ -96,7 +96,7 @@ function remove_repo () {
|
||||||
chrome)
|
chrome)
|
||||||
echo '正在删除chrome源...'
|
echo '正在删除chrome源...'
|
||||||
sudo rm /etc/apt/sources.list.d/chrome.list
|
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
|
read -p "删除完成, 是否更新索引? y/n: " action
|
||||||
if [[ "$action" == "" || "$action" == "y" ]]; then
|
if [[ "$action" == "" || "$action" == "y" ]]; then
|
||||||
sudo apt update
|
sudo apt update
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue