mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-07-08 10:00:31 +08:00
tpm requires make; set-tz; lemonbench
This commit is contained in:
parent
861a38255f
commit
b504e97598
@ -190,11 +190,11 @@ install_tmux_tpm(){
|
|||||||
if [[ -x $(command -v tmux) && ! -d "$TMUX_TPM" ]]; then
|
if [[ -x $(command -v tmux) && ! -d "$TMUX_TPM" ]]; then
|
||||||
fmt_note "installing tmux tpm ..."
|
fmt_note "installing tmux tpm ..."
|
||||||
git clone https://hub.fastgit.xyz/tmux-plugins/tpm "$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 ..."
|
fmt_note "initializing tmux plugins ..."
|
||||||
~/.tmux/plugins/tpm/bin/install_plugins
|
~/.tmux/plugins/tpm/bin/install_plugins
|
||||||
else
|
else
|
||||||
fmt_warning "pls install g++ and cmake and then init tmux plugins by <prefix + I>"
|
fmt_warning "pls install g++,cmake,make and then init tmux plugins by <prefix + I> or ~/.tmux/plugins/tpm/bin/install_plugins"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -26,12 +26,21 @@ apk_add()
|
|||||||
git config --global user.name "Dict Xiong"
|
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()
|
router()
|
||||||
{
|
{
|
||||||
case $1 in
|
case $1 in
|
||||||
apk-add ) apk_add ;;
|
apk-add ) apk_add ;;
|
||||||
|
set-timezone | set-tz ) set_timezone ;;
|
||||||
#set-mirror ) set_mirror $2 ;;
|
#set-mirror ) set_mirror $2 ;;
|
||||||
* ) echo unknown command "$1". available: apk-add;;
|
* ) echo unknown command "$1". available: apk-add, set-timezone;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ install_commands=(\
|
|||||||
[v2ray]="bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) #--remove" \
|
[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' \
|
[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' \
|
[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()
|
install()
|
||||||
|
@ -7,7 +7,7 @@ fi
|
|||||||
|
|
||||||
set_mirror()
|
set_mirror()
|
||||||
{
|
{
|
||||||
MIRROR=${1:="mirrors.tuna.tsinghua.edu.cn"}
|
MIRROR=${1:-"mirrors.tuna.tsinghua.edu.cn"}
|
||||||
MIRROR=${MIRROR//\//\\\/}
|
MIRROR=${MIRROR//\//\\\/}
|
||||||
sed -i 's/(archive|security).ubuntu.com/${MIRROR}/g' /etc/apt/sources.list
|
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"
|
git config --global user.name "Dict Xiong"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_timezone()
|
||||||
|
{
|
||||||
|
TIMEZONE=${1:-"Asia/Shanghai"}
|
||||||
|
timedatectl set-timezone "$TIMEZONE"
|
||||||
|
}
|
||||||
|
|
||||||
router()
|
router()
|
||||||
{
|
{
|
||||||
case $1 in
|
case $1 in
|
||||||
apt-install ) apt_install ;;
|
apt-install ) apt_install ;;
|
||||||
set-mirror ) set_mirror $2 ;;
|
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
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user