From d5666901453b95e70a26b29ac50c0438493be87a Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Mon, 23 May 2022 16:29:17 +0800 Subject: [PATCH] install more packages --- tools/msys2.sh | 31 +++++++++++++++++++++++++++++++ tools/ubuntu.sh | 7 +------ 2 files changed, 32 insertions(+), 6 deletions(-) create mode 100755 tools/msys2.sh diff --git a/tools/msys2.sh b/tools/msys2.sh new file mode 100755 index 0000000..bfebbae --- /dev/null +++ b/tools/msys2.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +if [[ $USER != "root" ]]; then + echo "must run as root!" + exit 1 +fi + +set_mirror() +{ + # MIRROR=${1:-"mirrors.tuna.tsinghua.edu.cn"} + # MIRROR=${MIRROR//\//\\\/} + # sed -i 's/(archive|security).ubuntu.com/${MIRROR}/g' /etc/apt/sources.list + echo "to do ..." +} + +pacman_S() +{ + pacman -Syu + pacman -S tmux git zsh curl vim wget base-devel mingw-w64-x86_64-toolchain make cmake gcc zip +} + +router() +{ + case $1 in + pacman-S ) pacman_S ;; + set-mirror ) set_mirror $2 ;; + * ) echo unknown command "$1". available: pacman-S, set-mirror ;; + esac +} + +router $@ diff --git a/tools/ubuntu.sh b/tools/ubuntu.sh index 090b965..c06b6e8 100755 --- a/tools/ubuntu.sh +++ b/tools/ubuntu.sh @@ -19,13 +19,8 @@ apt_install() for i in {man-db,vim,ca-certificates}; do apt install $i -y; done # mass installation - apt update - apt install git tmux zsh curl wget dialog net-tools dnsutils netcat traceroute sudo python3 python3-pip cron inetutils-ping openssh-client openssh-server htop gcc g++ cmake make + apt install git tmux zsh curl wget dialog net-tools dnsutils netcat traceroute sudo python3 python3-pip cron inetutils-ping openssh-client openssh-server htop gcc g++ cmake make zip for i in {fzf,ripgrep}; do apt install $i -y; done - - # who am i - git config --global user.email "me@beardic.cn" - git config --global user.name "Dict Xiong" } set_timezone()