mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 10:27:00 +08:00
install.sh: cmake, less, and -l=DFS_LITE (#23)
* install.sh: cmake and less * install.sh: -l=DFS_LITE * ci: support -l=DFS_LITE Co-authored-by: xiongdian.me <xiongdian.me@bytedance.com>
This commit is contained in:
parent
6dce3cfa18
commit
300b3a29b7
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
|
@ -22,8 +22,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
rev=`git rev-parse HEAD`
|
rev=`git rev-parse HEAD`
|
||||||
pwd
|
pwd
|
||||||
export DFS_NO_COMPILE=1
|
./install.sh -d -l
|
||||||
./install.sh -d
|
|
||||||
test `git rev-parse HEAD` = "$rev"
|
test `git rev-parse HEAD` = "$rev"
|
||||||
|
|
||||||
- name: antigen build
|
- name: antigen build
|
||||||
|
@ -70,8 +69,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
rev=`git rev-parse HEAD`
|
rev=`git rev-parse HEAD`
|
||||||
pwd
|
pwd
|
||||||
export DFS_NO_COMPILE=1
|
./install.sh -d -l
|
||||||
./install.sh -d
|
|
||||||
test `git rev-parse HEAD` = "$rev"
|
test `git rev-parse HEAD` = "$rev"
|
||||||
|
|
||||||
- name: antigen build
|
- name: antigen build
|
||||||
|
@ -115,8 +113,7 @@ jobs:
|
||||||
- name: install dfs
|
- name: install dfs
|
||||||
run: |
|
run: |
|
||||||
rev=`git rev-parse HEAD`
|
rev=`git rev-parse HEAD`
|
||||||
export DFS_NO_COMPILE=1
|
./install.sh -d -a -l
|
||||||
./install.sh -d -a
|
|
||||||
test `git rev-parse HEAD` = "$rev"
|
test `git rev-parse HEAD` = "$rev"
|
||||||
|
|
||||||
- name: antigen build with DFS_NO_WALL
|
- name: antigen build with DFS_NO_WALL
|
||||||
|
|
16
install.sh
16
install.sh
|
@ -34,7 +34,7 @@ install_dependencies()
|
||||||
case $(get_linux_dist) in
|
case $(get_linux_dist) in
|
||||||
"ubuntu"|"debian" )
|
"ubuntu"|"debian" )
|
||||||
$SUDO apt-get update
|
$SUDO apt-get update
|
||||||
$SUDO apt-get install -y git zsh bash tmux vim python3 python3-pip curl inetutils-ping
|
$SUDO apt-get install -y git zsh bash tmux vim python3 python3-pip curl inetutils-ping cmake less
|
||||||
;;
|
;;
|
||||||
"alpine" )
|
"alpine" )
|
||||||
$SUDO apk update
|
$SUDO apk update
|
||||||
|
@ -191,9 +191,12 @@ install_tmux_tpm(){
|
||||||
fmt_note "installing tmux tpm ..."
|
fmt_note "installing tmux tpm ..."
|
||||||
git clone https://gitee.com/dictxiong/tpm "$TMUX_TPM"
|
git clone https://gitee.com/dictxiong/tpm "$TMUX_TPM"
|
||||||
if [[ -x $(command -v g++) && -x $(command -v cmake) && -x $(command -v make) ]]; then
|
if [[ -x $(command -v g++) && -x $(command -v cmake) && -x $(command -v make) ]]; then
|
||||||
fmt_note "initializing tmux plugins ..."
|
if [[ -z "$DFS_LITE" || "$DFS_LITE" == "0" ]]; then
|
||||||
if [[ -z "$DFS_NO_COMPILE" ]]; then
|
fmt_note "initializing tmux plugins ..."
|
||||||
~/.tmux/plugins/tpm/bin/install_plugins
|
~/.tmux/plugins/tpm/bin/install_plugins
|
||||||
|
else
|
||||||
|
fmt_warning "in lite mode, tmux plugins are downloaded but not complied"
|
||||||
|
fmt_info "try <prefix + I> or ~/.tmux/plugins/tpm/bin/install_plugins to complie manually"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
fmt_warning "pls install g++,cmake,make and then init tmux plugins by <prefix + I> or ~/.tmux/plugins/tpm/bin/install_plugins"
|
fmt_warning "pls install g++,cmake,make and then init tmux plugins by <prefix + I> or ~/.tmux/plugins/tpm/bin/install_plugins"
|
||||||
|
@ -254,10 +257,11 @@ while [[ $# > 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-i ) BIN=install ;;
|
-i ) BIN=install ;;
|
||||||
-r ) BIN=uninstall ;;
|
-r ) BIN=uninstall ;;
|
||||||
-q ) export DFS_QUIET=1 ;;
|
-q|--quite ) export DFS_QUIET=1 ;;
|
||||||
-d ) export DFS_DEV=1 ;;
|
-d|--dev ) export DFS_DEV=1 ;;
|
||||||
|
-l|--lite ) export DFS_LITE=1 ;;
|
||||||
-a|--auto ) install_dependencies ;;
|
-a|--auto ) install_dependencies ;;
|
||||||
* ) fmt_warning "unknown command \"$1\". available: -i, -r, -q, -d"; exit 1 ;;
|
* ) fmt_warning "unknown command \"$1\". available: -i, -r, -q, -d, -l, -a"; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
|
@ -103,7 +103,7 @@ setup_color() {
|
||||||
|
|
||||||
ask_for_yN()
|
ask_for_yN()
|
||||||
{
|
{
|
||||||
while [[ -z "$DFS_QUIET" ]]; do
|
while [[ -z "$DFS_QUIET" || "$DFS_QUIET" == "0" ]]; do
|
||||||
read -p "${FMT_YELLOW}$1${FMT_RESET} [yN]: " yn
|
read -p "${FMT_YELLOW}$1${FMT_RESET} [yN]: " yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]* ) return 1;;
|
[Yy]* ) return 1;;
|
||||||
|
@ -115,7 +115,7 @@ ask_for_yN()
|
||||||
|
|
||||||
ask_for_Yn()
|
ask_for_Yn()
|
||||||
{
|
{
|
||||||
while [[ -z "$DFS_QUIET" ]]; do
|
while [[ -z "$DFS_QUIET" || "$DFS_QUIET" == "0" ]]; do
|
||||||
read -p "${FMT_YELLOW}$1${FMT_RESET} [Yn]: " yn
|
read -p "${FMT_YELLOW}$1${FMT_RESET} [Yn]: " yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Nn]* ) return 0;;
|
[Nn]* ) return 0;;
|
||||||
|
|
|
@ -17,7 +17,7 @@ apt_install()
|
||||||
for i in {man-db,vim,ca-certificates}; do apt install $i -y; done
|
for i in {man-db,vim,ca-certificates}; do apt install $i -y; done
|
||||||
|
|
||||||
# mass installation
|
# mass installation
|
||||||
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
|
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 less
|
||||||
for i in {fzf,ripgrep}; do apt install $i -y; done
|
for i in {fzf,ripgrep}; do apt install $i -y; done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user