init tools/install.sh and adding ssh to tools/ubuntu.sh

This commit is contained in:
Dict Xiong 2022-05-18 09:21:18 +08:00
parent fbf358979f
commit 5aa99aabdf
2 changed files with 18 additions and 2 deletions

16
tools/install.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
declare -A install_commands
install_commands=(\
[git]="apt update && apt install git" \
[fzf]="git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && ~/.fzf/install" \
[acme.sh]="curl https://get.acme.sh | sh -s email=${EMAIL:-me@beardic.cn}" \
[oh-my-zsh]='sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"' \
)
install()
{
echo ${install_commands[$1]}
}
install $1

View File

@ -18,11 +18,11 @@ init()
# mass installation # mass installation
apt update apt update
apt install git tmux zsh curl wget dialog net-tools dnsutils netcat traceroute sudo python3 python3-pip cron inetutils-ping apt install git tmux zsh curl wget dialog net-tools dnsutils netcat traceroute sudo python3 python3-pip cron inetutils-ping openssh-client openssh-server
for i in {fzf,ripgrep}; do apt install $i -y; done for i in {fzf,ripgrep}; do apt install $i -y; done
# custom dotfiles (usually not needed) # custom dotfiles (usually not needed)
# mkdir -p ~/.ssh mkdir -p ~/.ssh
# cd ~ && git clone https://gitee.com/dictxiong/dotfiles && ./dotfiles/install.sh # cd ~ && git clone https://gitee.com/dictxiong/dotfiles && ./dotfiles/install.sh
# who am i # who am i