diff --git a/install.sh b/install.sh index 2021750..a2fc5b8 100755 --- a/install.sh +++ b/install.sh @@ -190,11 +190,11 @@ install_tmux_tpm(){ if [[ -x $(command -v tmux) && ! -d "$TMUX_TPM" ]]; then fmt_note "installing tmux tpm ..." git clone https://hub.fastgit.xyz/tmux-plugins/tpm "$TMUX_TPM" - if [[ -x $(command -v g++) && -x $(command -v cmake) ]]; then + if [[ -x $(command -v g++) && -x $(command -v cmake) && -x $(command -v make) ]]; then fmt_note "initializing tmux plugins ..." ~/.tmux/plugins/tpm/bin/install_plugins else - fmt_warning "pls install g++ and cmake and then init tmux plugins by " + fmt_warning "pls install g++,cmake,make and then init tmux plugins by or ~/.tmux/plugins/tpm/bin/install_plugins" fi fi } diff --git a/tools/alpine.sh b/tools/alpine.sh index 5f9ca24..031b9bb 100755 --- a/tools/alpine.sh +++ b/tools/alpine.sh @@ -26,12 +26,21 @@ apk_add() git config --global user.name "Dict Xiong" } +set_timezone() +{ + apk update + apk add tzdata + cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime + echo "Asia/Shanghai" > /etc/timezone +} + router() { case $1 in apk-add ) apk_add ;; + set-timezone | set-tz ) set_timezone ;; #set-mirror ) set_mirror $2 ;; - * ) echo unknown command "$1". available: apk-add;; + * ) echo unknown command "$1". available: apk-add, set-timezone;; esac } diff --git a/tools/install.sh b/tools/install.sh index 8e43bb0..0b8cd5f 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -10,6 +10,7 @@ install_commands=(\ [v2ray]="bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) #--remove" \ [zerotier-one]='curl -s https://install.zerotier.com | sudo bash' \ [docker-ce]='curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh #--mirror Aliyun #--dry-run' \ + [lemonbench]='curl -fsSL https://ilemonra.in/LemonBenchIntl | bash -s fast # or full' \ ) install() diff --git a/tools/ubuntu.sh b/tools/ubuntu.sh index ecf290c..090b965 100755 --- a/tools/ubuntu.sh +++ b/tools/ubuntu.sh @@ -7,7 +7,7 @@ fi set_mirror() { - MIRROR=${1:="mirrors.tuna.tsinghua.edu.cn"} + MIRROR=${1:-"mirrors.tuna.tsinghua.edu.cn"} MIRROR=${MIRROR//\//\\\/} sed -i 's/(archive|security).ubuntu.com/${MIRROR}/g' /etc/apt/sources.list } @@ -28,12 +28,20 @@ apt_install() git config --global user.name "Dict Xiong" } +set_timezone() +{ + TIMEZONE=${1:-"Asia/Shanghai"} + timedatectl set-timezone "$TIMEZONE" +} + router() { case $1 in apt-install ) apt_install ;; set-mirror ) set_mirror $2 ;; - * ) echo unknown command "$1". available: apt-install, set-mirror;; + set-timezone\ + | set-tz ) set_timezone $2 ;; + * ) echo unknown command "$1". available: apt-install, set-mirror, set-timezone;; esac }