-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebian-desktop-postinstall.sh
More file actions
executable file
·64 lines (49 loc) · 1.42 KB
/
debian-desktop-postinstall.sh
File metadata and controls
executable file
·64 lines (49 loc) · 1.42 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
#!/bin/env bash
# List of additional software to install
addsoftwares=(vim tar git tmux ncdu htop)
# List of additional development software to install
adddev=(rbenv)
arch=$(uname -m)
# check root
if [[ $EUID -ne 0 ]]
then
sudo chmod +x "$(dirname "$0")/$0"
sudo "$(dirname "$0")/$0"
exit;
fi
# Upgrade
apt update && apt -y upgrade
# Tools
if [[ -n ${addsoftwares[*]} ]]
then
apt install -y "${addsoftwares[@]}"
fi
type -p tmux >/dev/null && curl -JLO https://raw.githubusercontent.com/imomaliev/tmux-bash-completion/master/completions/tmux && mv tmux /usr/share/bash-completion/completions/tmux
# Development
if [[ -n ${adddev[*]} ]]
then
apt install -y "${adddev[@]}"
eval "$(rbenv init -)"
fi
# install or update starship
curl -fsS https://starship.rs/install.sh | bash -s -- -y
# install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# install go
case $arch in
aarch64)
curl -JLO https://golang.org/dl/go1.17.2.linux-arm64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.2.linux-arm64.tar.gz
rm go1.17.2.linux-arm64.tar.gz
;;
x86_64)
curl -JLO https://golang.org/dl/go1.17.2.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.2.linux-amd64.tar.gz
rm go1.17.2.linux-amd64.tar.gz
;;
*);;
esac
echo "Add /usr/local/go/bin to the PATH environment variable"
# add gems
gem install timetrap
echo "Preparation completed, it is recommended to restart!"