-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinitializer.sh
32 lines (28 loc) · 851 Bytes
/
initializer.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
#!/bin/bash
declare -a installArray
declare -a installationData
declare -a TEMP
#input format: 'ppa|appname'
installationData[0]="ppa:webupd8team/java|oracle-java8-installer"
installationData[1]="ppa:git-core/ppa|git"
installationData[2]="ppa:mercurial-ppa/releases|mercurial"
installationData[3]="ppa:tortoisehg-ppa/releases|tortoisehg"
#adding repositories
for i in "${installationData[@]}"
do
TEMP=(${i//|/ })
sudo add-apt-repository -y "${TEMP[0]}"
echo -e "Added new repository: ${TEMP[0]}"
done
#updating repository list
echo -e "Updating repository list..."
sudo apt-get -y update &> /dev/null
echo -e "Done! \n\n"
#installation of apps
for i in "${installationData[@]}"
do
TEMP=(${i//|/ })
echo -e "Installing ${TEMP[1]}..."
sudo apt-get -y install "${TEMP[1]}"
echo -e "Done!"
done