-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_base.sh
More file actions
executable file
·67 lines (55 loc) · 1.86 KB
/
Copy pathsetup_base.sh
File metadata and controls
executable file
·67 lines (55 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env bash
# 0. 解析参数
HOME=/home/haoming
PRIVILEGE=''
UBUNTU_VER="24.04"
for i in "$@"; do
case $i in
--home=*)
HOME="${i#*=}"
shift
;;
--privilege)
PRIVILEGE="sudo"
shift # past argument=value
;;
--ubuntu-ver=*)
UBUNTU_VER="${i#*=}"
shift # past argument=value
;;
-*|--*)
echo "Unknown option $i"
exit 1
;;
*)
;;
esac
done
RED='\033[0;31m'
echo "${RED}HOME: ${HOME}"
echo "${RED}SUDO: ${SUDO}"
echo "${RED}UBUNTU_VER: ${UBUNTU_VER}"
${SUDO} apt update
${SUDO} apt install -y \
gpg curl g++ gcc build-essential zsh wget \
tig tree silversearcher-ag htop ssh unzip cargo \
lsb-release npm rsync language-pack-zh-hans \
software-properties-common net-tools universal-ctags \
python3-pip openssh-server python3-pynvim python3-virtualenv \
connect-proxy command-not-found
curl https://apt.kitware.com/keys/kitware-archive-latest.asc | ${SUDO} apt-key add -
echo "deb https://apt.kitware.com/ubuntu/ `lsb_release -c -s` main" | ${SUDO} tee /etc/apt/sources.list.d/kitware.list
${SUDO} add-apt-repository -y -n ppa:neovim-ppa/unstable
${SUDO} add-apt-repository -y -n ppa:git-core/ppa
${SUDO} apt update
${SUDO} apt install -y cmake git neovim
${SUDO} apt upgrade -y
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --completion --key-bindings --all
pushd /opt
wget -q --show-progress https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
tar -zxvf nvim-linux-x86_64.tar.gz
rm nvim-linux-x86_64.tar.gz
popd