-
Notifications
You must be signed in to change notification settings - Fork 0
/
env-setup.sh
executable file
·131 lines (110 loc) · 3.45 KB
/
env-setup.sh
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/bin/bash
set -e
BASE_URL="https://raw.githubusercontent.com/sobanieca/env-setup/master/"
ARCH=$(dpkg --print-architecture)
# Update system
echo "Registering additional package repositories..."
echo "deb [signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debian/ stable main" | sudo tee /etc/apt/sources.list.d/azlux.list
sudo wget -O /usr/share/keyrings/azlux-archive-keyring.gpg https://azlux.fr/repo.gpg
echo "Finished registration."
echo "Updating system..."
sudo apt-get update
sudo apt-get dist-upgrade
echo "Finished update."
# Create tools directory and add it to path
if [ ! -d "$HOME/tools" ]; then
echo "Creating tools directory and adding it to PATH variable..."
mkdir $HOME/tools
echo "Tools directory created."
fi
if ! grep --quiet bashrcx $HOME/.bashrc; then
echo "Registering .bashrcx file..."
echo ". ~/.bashrcx" >> $HOME/.bashrc
echo "Bashrcx file registered."
fi
# Install curl
echo "Installing curl..."
sudo apt-get install curl -y
echo "Curl installed."
# Install ripgrep
echo "Installing ripgrep..."
sudo apt-get install ripgrep -y
echo "Ripgrep installed."
# Install dos2unix
echo "Installing dos2unix..."
sudo apt-get install dos2unix -y
echo "Dos2unix installed."
# Install GIT
echo "Installing Git..."
sudo apt-get install git -y
git config --global user.email "[email protected]"
git config --global user.name "Adam Sobaniec"
git config --global credential.helper store
git config --global pull.ff only
git config --global stash.showIncludeUntracked true
echo "Git installed."
# Install atop
echo "Installing atop..."
sudo apt-get install atop -y
echo "Atop installed."
# Install fzf
echo "Installing fzf..."
sudo apt-get install fzf -y
echo "Fzf installed."
# Install jq
echo "Installing jq..."
sudo apt-get install jq -y
echo "Jq installed."
# Install C++ build tools
echo "Installing C++ build tools..."
sudo apt-get install g++ -y
echo "C++ build tools installed."
# Install Node.js
echo "Installing nvm and node.js..."
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install --lts
nvm use --lts
echo "Nvm and node.js installed."
# Install Deno
echo "Installing Deno..."
sudo apt-get install unzip -y
curl -fsSL https://deno.land/install.sh | sh || true
echo "Deno installed."
# Install Tmux
echo "Installing tmux..."
sudo apt-get install tmux -y
if [ ! -d "$HOME/.tmux/plugins/tpm" ]; then
git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm
fi
echo "Tmux installed."
# Install Gitmux
echo "Installing gitmux..."
mkdir temp
cd temp
if [ "$ARCH" == "arm64" ];
then
wget https://github.com/arl/gitmux/releases/download/v0.10.3/gitmux_v0.10.3_linux_arm64.tar.gz
tar -xf gitmux_v0.10.3_linux_arm64.tar.gz
else
wget https://github.com/arl/gitmux/releases/download/v0.10.3/gitmux_v0.10.3_linux_amd64.tar.gz
tar -xf gitmux_v0.10.3_linux_amd64.tar.gz
fi
sudo mv gitmux /usr/local/bin
cd ..
rm -rf temp
echo "Gitmux installed."
# Install tshark
echo "Installing tshark..."
sudo apt-get install tshark -y
echo "Tshark installed."
# Install lsd
echo "Installing lsd..."
sudo apt-get install lsd -y
echo "Lsd installed."
# Update-configs script
wget $BASE_URL"update-configs" -O $HOME/tools/update-configs
chmod +x $HOME/tools/update-configs
. $HOME/tools/update-configs