diff --git a/tools/install.sh b/tools/install.sh new file mode 100755 index 0000000..25b36a5 --- /dev/null +++ b/tools/install.sh @@ -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 diff --git a/tools/ubuntu.sh b/tools/ubuntu.sh index d440992..9b36071 100755 --- a/tools/ubuntu.sh +++ b/tools/ubuntu.sh @@ -18,11 +18,11 @@ init() # mass installation 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 # custom dotfiles (usually not needed) - # mkdir -p ~/.ssh + mkdir -p ~/.ssh # cd ~ && git clone https://gitee.com/dictxiong/dotfiles && ./dotfiles/install.sh # who am i