-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·94 lines (67 loc) · 2.71 KB
/
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
"""
Last configured for 23.04 on 03/05/2023
"""
# Google chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
rm google-chrome-stable_current_amd64.deb
# Dependencies
sudo apt update
sudo apt install -y \
build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
# Tools
sudo apt install -y git curl
# Python
# Install python3.10
# This may need changed for different versions. Also, check to see if the deadsnakes PPA has the correct version first.
wget -c https://www.python.org/ftp/python/3.10.11/Python-3.10.11.tar.xz
tar -Jxf Python-3.10.11.tar.xz
cd Python-3.11.0/
./configure --enable-optimizations
sudo make -j8
sudo make install
sudo apt install python3-pip
# Then adding deadsnakes for the other python versions
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.11 python3.11-dev
# Redis
sudo snap install redis
# Postgresql
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update
sudo apt -y install postgresql-15 postgresql-server-dev-15
# Other programs
snap install sublime-text --classic
sudo apt install peek
sudo snap install micro --classic
sudo snap install spotify
sudo snap install heroku --classic
sudo snap install pycharm-professional --classic
sudo snap install slack --classic
sudo pip3 install virtualenv awscli devtools
sudo apt install gh xclip
# Yarn/NPM
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn npm -y
# Generate RSA key
ssh-keygen -t rsa -b 4096 -C "[email protected]"
ssh-add ~/.ssh/id_rsa
xclip -sel clip < ~/.ssh/id_rsa.pub
echo "RSA key copied to clipboard. Paste into https://github.com/settings/keys then press a key to continue"
read -n 1 -s
# Clone repos
git clone [email protected]:tomhamiltonstubber/setup repos
git clone [email protected]:tutorcruncher/TutorCruncher2 repos/TutorCruncher2
git clone [email protected]:tutorcruncher/tutorcruncher.com repos/tutorcruncher.com
# Update .bashrc with custom files
echo -e "\nif [ -f ~/repos/.bash_custom ]; then\n . ~/repos/.bash_custom\nfi" >> .bashrc
# Add .gitconfig file
touch ".gitconfig"
echo -e "[user]\n\tname = Tom Hamilton Stubber\n\temail = [email protected]\n[include]\n\tpath = ~/repos/.git_custom" >> .gitconfig
# Create the .data dir for tests/linting
mkdir repos/.data