add nano & bin
This commit is contained in:
parent
d85e6ca44d
commit
d3c625dc21
5
files/nanorc
Normal file
5
files/nanorc
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
set nohelp
|
||||||
|
set tabsize 4
|
||||||
|
set autoindent
|
||||||
|
set tabstospaces
|
||||||
|
# set linenumbers
|
||||||
46
init_root.sh
46
init_root.sh
@ -9,9 +9,11 @@ check_google_access() {
|
|||||||
if [ "$response" -eq 200 ]; then
|
if [ "$response" -eq 200 ]; then
|
||||||
echo "Internet: abroad"
|
echo "Internet: abroad"
|
||||||
abroad=1
|
abroad=1
|
||||||
|
github="https://github.com"
|
||||||
else
|
else
|
||||||
echo "Internet: internal"
|
echo "Internet: internal"
|
||||||
abroad=0
|
abroad=0
|
||||||
|
github="https://g.nano.ac/https://github.com"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,6 +36,50 @@ configure_ssh_keygen() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configure_nano() {
|
||||||
|
read -p "要配置 nano 吗?[Y/n]: " response
|
||||||
|
|
||||||
|
if [[ -z "$response" ]] || [[ $response =~ ^[Yy]$ ]]; then
|
||||||
|
apt install nano -y
|
||||||
|
cp $scriptdir/files/nanorc ~/.nanorc
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
configure_install_bin() {
|
||||||
|
apt update
|
||||||
|
apt upgrade -y
|
||||||
|
apt autoremove -y
|
||||||
|
apt install tmux git curl htop net-tools tcptraceroute ifupdown tar unzip -y
|
||||||
|
apt install hexyl bat neofetch fd-find fzf -y
|
||||||
|
|
||||||
|
apt install exa -y
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
cd $tempdir
|
||||||
|
wget -O exa.zip "$(github)/ogham/exa/releases/download/v0.10.1/exa-linux-x86_64-v0.10.1.zip"
|
||||||
|
unzip exa.zip -d exa
|
||||||
|
cp exa/bin/* /usr/local/bin/
|
||||||
|
cp exa/man/* /usr/share/man/man1/
|
||||||
|
cp exa/completions/exa.zsh /usr/local/share/zsh/site-functions
|
||||||
|
rm exa -r
|
||||||
|
rm exa.zip
|
||||||
|
cd -
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
configure_zsh() {
|
||||||
|
read -p "要配置 zsh 吗?[Y/n]: " response
|
||||||
|
|
||||||
|
if [[ -z "$response" ]] || [[ $response =~ ^[Yy]$ ]]; then
|
||||||
|
apt install zsh -y
|
||||||
|
# touch -p ~/.ssh
|
||||||
|
# read -p "sshkey 的名字: " sshkeyname
|
||||||
|
# ssh-keygen -t ed25519 -C $sshkeyname
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
check_google_access
|
check_google_access
|
||||||
configure_ssh
|
configure_ssh
|
||||||
configure_ssh_keygen
|
configure_ssh_keygen
|
||||||
|
configure_nano
|
||||||
|
configure_install_bin
|
||||||
|
configure_zsh
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user