From 5aa99aabdf869cb8c7a7998027e9468fac18bc61 Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Wed, 18 May 2022 09:21:18 +0800 Subject: [PATCH] init tools/install.sh and adding ssh to tools/ubuntu.sh --- tools/install.sh | 16 ++++++++++++++++ tools/ubuntu.sh | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 tools/install.sh 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