-
Notifications
You must be signed in to change notification settings - Fork 0
/
drive.sh
134 lines (115 loc) · 3.08 KB
/
drive.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
131
132
133
134
#!/bin/sh
# Daniel's Bootstrapping Script
# Liscence: GNU GPLv3
introduction() {
echo "Daniel's Bootstrap Script"
echo
echo "This scripts contains some of the packages I use and some of my config files. Hope you find it useful as well!"
echo "Run as root, and update your system before continuing!"
echo
}
#Script to update
updater() {
echo "Updating system..."
sudo apt upgrade && sudo apt update;
echo
echo "Update finished!"
echo
}
proginstall() {
# Add repositories
echo "Installing Programs..."
echo "deb http://ftp.us.debian.org/debian/ bullseye main contrib non-free
deb-src http://ftp.us.debian.org/debian/ bullseye main contrib non-free
deb http://ftp.us.debian.org/debian/ bullseye-updates main contrib non-free
deb http://deb.debian.org/ bullseye-security main contrib non-free
deb-src http://deb.debian.org/ bullseye-security main contrib non-free" >> /etc/apt/sources.list
sudo apt update
# Download files from programs.txt
programs="programs.txt"
Lines=$(cat $programs)
for Line in $Lines
do
echo "Installing $Line"
sudo apt install $Line -y
done
# Install brave browser
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list
sudo apt update
sudo apt install brave-browser -y
echo
echo "Programs installed!";
echo
}
gamesinstall() {
echo "Installing games..."
whiptail --title "Games"\
--msgbox "Installing Games"
games="games.txt"
Lines=$(cat $games)
for Line in $Lines
do
echo "Installing $Line"
sudo apt install $Line -y
done
#New path variable for pip install
echo export PATH+"$HOME/.local/bin:$PATH" >> ~/.bashrc
curl -LJO https://github.com/abw333/dominoes
sed $HOME/.local.bin/dominoes
sed -i "1s/.*/#!/usr/bin/python3/" $HOME/.local/bin/dominoes/domino;
echo
echo "Games installed!"
echo
}
proguninstall() {
programs="programs.txt"
Lines=$(cat $programs)
for Line in $Lines
do
echo "Installing $Line"
sudo apt remove $Line -y
done
echo "Uninstalled all programs!";
}
# Create desired filestructure
createfs() {
echo "Making file structure..."
sudo mkdir Downloads Documents Images Scripts Music ~/Documents/eBooks ~/Images/Wallpapers;
echo
echo "File structure created!"
echo
}
#Move config files
mvconfig() {
echo "Moving config files..."
sudo mv ../.config/.Xresources ~/
sudo mv ../.config/.bashrc ~/
curl -Ls "https://raw.githubusercontent.com/drivera021/drive/master/.config/" > "/home/$name/.config/";
echo
echo "Files moved!"
echo
}
introduction
PS3="Please select your choice: "
options=("Install + Config" "Games Install" "Uninstall")
select opt in "${options[@]}"
do
case $opt in
"Install + Config")
updater
proginstall
mvconfig
;;
"Games Install")
gamesinstall
;;
"Uninstall")
proguninstall
;;
"Exit")
break
;;
esac
done
echo "All done!"