format
This commit is contained in:
parent
883b459202
commit
ad80b91f6b
@ -177,17 +177,17 @@ configure_zsh() {
|
|||||||
~/.miniconda3/bin/mamba init zsh
|
~/.miniconda3/bin/mamba init zsh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp $scriptdir/files/zsh/.zsh_user ~/.zsh_user
|
cp $scriptdir/files/zsh/.zsh_user ~/.zsh_user
|
||||||
cp $scriptdir/files/zsh/00-init.zsh ~/.oh-my-zsh/custom/
|
cp $scriptdir/files/zsh/00-init.zsh ~/.oh-my-zsh/custom/
|
||||||
cp $scriptdir/files/zsh/10-theme.zsh ~/.oh-my-zsh/custom/
|
cp $scriptdir/files/zsh/10-theme.zsh ~/.oh-my-zsh/custom/
|
||||||
cp $scriptdir/files/zsh/20-function.zsh ~/.oh-my-zsh/custom/
|
cp $scriptdir/files/zsh/20-function.zsh ~/.oh-my-zsh/custom/
|
||||||
cp $scriptdir/files/zsh/50-env.zsh ~/.oh-my-zsh/custom/
|
cp $scriptdir/files/zsh/50-env.zsh ~/.oh-my-zsh/custom/
|
||||||
cp $scriptdir/files/zsh/51-alias.zsh ~/.oh-my-zsh/custom/
|
cp $scriptdir/files/zsh/51-alias.zsh ~/.oh-my-zsh/custom/
|
||||||
cp $scriptdir/files/zsh/90-other.zsh ~/.oh-my-zsh/custom/
|
cp $scriptdir/files/zsh/90-other.zsh ~/.oh-my-zsh/custom/
|
||||||
cp $scriptdir/files/zsh/ys-simple.zsh-theme ~/.oh-my-zsh/custom/themes/
|
cp $scriptdir/files/zsh/ys-simple.zsh-theme ~/.oh-my-zsh/custom/themes/
|
||||||
|
|
||||||
[ $abroad -eq 1 ] && return
|
[ $abroad -eq 1 ] && return
|
||||||
cp $scriptdir/files/zsh/80-proxy.zsh ~/.oh-my-zsh/custom/
|
cp $scriptdir/files/zsh/80-proxy.zsh ~/.oh-my-zsh/custom/
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,11 +227,11 @@ configure_docker() {
|
|||||||
fi
|
fi
|
||||||
# 添加软件源的 GPG 密钥,并向 sources.list 中添加 Docker 软件源
|
# 添加软件源的 GPG 密钥,并向 sources.list 中添加 Docker 软件源
|
||||||
if [ $abroad -eq 1 ]; then
|
if [ $abroad -eq 1 ]; then
|
||||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/docker-archive-keyring.gpg > /dev/null
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/docker-archive-keyring.gpg >/dev/null
|
||||||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
|
||||||
else
|
else
|
||||||
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/docker-archive-keyring.gpg > /dev/null
|
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/docker-archive-keyring.gpg >/dev/null
|
||||||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
|
||||||
fi
|
fi
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install docker-ce docker-ce-cli containerd.io -y
|
sudo apt-get install docker-ce docker-ce-cli containerd.io -y
|
||||||
@ -263,26 +263,28 @@ configure_docker() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_yarn() {
|
configure_yarn() {
|
||||||
echo "Incomplete"; return
|
echo "Incomplete"
|
||||||
|
return
|
||||||
|
|
||||||
curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarn.gpg > /dev/null
|
curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarn.gpg >/dev/null
|
||||||
echo "deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list > /dev/null
|
echo "deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_mongodb() {
|
configure_mongodb() {
|
||||||
echo "Incomplete"; return
|
echo "Incomplete"
|
||||||
|
return
|
||||||
|
|
||||||
version=7.0
|
version=7.0
|
||||||
curl -fsSL https://pgp.mongodb.com/server-$version.asc | gpg --dearmor | sudo tee /usr/share/keyrings/mongodb-server-$version.gpg > /dev/null
|
curl -fsSL https://pgp.mongodb.com/server-$version.asc | gpg --dearmor | sudo tee /usr/share/keyrings/mongodb-server-$version.gpg >/dev/null
|
||||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/mongodb-server-$version.gpg] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/$version multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-$version.list > /dev/null
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/mongodb-server-$version.gpg] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/$version multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-$version.list >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_nginx() {
|
configure_nginx() {
|
||||||
[ $offline -eq 1 ] && return
|
[ $offline -eq 1 ] && return
|
||||||
if [ ! -f /etc/apt/sources.list.d/nginx.list ]; then
|
if [ ! -f /etc/apt/sources.list.d/nginx.list ]; then
|
||||||
curl -fsSL https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx.gpg > /dev/null
|
curl -fsSL https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx.gpg >/dev/null
|
||||||
echo "deb [signed-by=/usr/share/keyrings/nginx.gpg] https://nginx.org/packages/ubuntu/ $(lsb_release -cs) nginx" | sudo tee /etc/apt/sources.list.d/nginx.list > /dev/null
|
echo "deb [signed-by=/usr/share/keyrings/nginx.gpg] https://nginx.org/packages/ubuntu/ $(lsb_release -cs) nginx" | sudo tee /etc/apt/sources.list.d/nginx.list >/dev/null
|
||||||
echo "deb-src [signed-by=/usr/share/keyrings/nginx.gpg] https://nginx.org/packages/ubuntu/ $(lsb_release -cs) nginx" | sudo tee -a /etc/apt/sources.list.d/nginx.list > /dev/null
|
echo "deb-src [signed-by=/usr/share/keyrings/nginx.gpg] https://nginx.org/packages/ubuntu/ $(lsb_release -cs) nginx" | sudo tee -a /etc/apt/sources.list.d/nginx.list >/dev/null
|
||||||
fi
|
fi
|
||||||
if confirm_action "要安装 nginx 吗?" "Y"; then
|
if confirm_action "要安装 nginx 吗?" "Y"; then
|
||||||
sudo apt update
|
sudo apt update
|
||||||
|
|||||||
@ -80,7 +80,7 @@ configure_nvm() {
|
|||||||
nvm alias default lts/iron
|
nvm alias default lts/iron
|
||||||
nvm install-latest-npm
|
nvm install-latest-npm
|
||||||
if [ $abroad -ne 1 ]; then
|
if [ $abroad -ne 1 ]; then
|
||||||
echo "registry=https://registry.npmmirror.com" > ~/.npmrc
|
echo "registry=https://registry.npmmirror.com" >~/.npmrc
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user