-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·126 lines (81 loc) · 3.05 KB
/
install.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
source colors.sh
BANNER=$(cat banner)
printf "${BLUE}${BANNER}${NC}\n"
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
#Creating folders for backup,sawp and viminfo
function createFolders {
if [ ! -d $1 ]; then
mkdir -p $1
printf "${ORANGE}$1 folder created${NC}\n"
else
printf "${RED}$1 folder could not be created because it already exists!${NC}\n"
fi
}
function downloadDependences {
# $1 = zip $2 = url $3 = folder $4 = name
if [ ! -f $1 ]; then
mkdir -p $3
simpleDownload $1 $2 $4
unzip -qq $1 -d $3
printf "${GREEN}$4 successful instaled!!!\n${NC}"
else
printf "${RED}Could not download dependence $4${NC}\n"
fi
}
function simpleDownload {
curl -so $1 $2
printf "${YELLOW} $3 downloaded${NC}\n"
}
#Creating folders
createFolders .vim/files
createFolders .vim/files/backup
createFolders .vim/files/swap
createFolders .vim/files/info
DEVFOLDER=~/Documents/Desenvolvimento
createFolders $DEVFOLDER/Workspace
#Setting Maven
MAVENFOLDER=$DEVFOLDER/Maven
#mkdir -p $MAVENFOLDER/3.3.9
MAVENURL=http://mirror.nbtelecom.com.br/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip
MAVENFOLDER_BIN=$MAVENFOLDER/3.3.9
MAVENZIP=$MAVENFOLDER/maven.zip
downloadDependences $MAVENZIP $MAVENURL $MAVENFOLDER_BIN Maven
TOMCATFOLDER=$DEVFOLDER/Tomcat
TOMCATZIP=$TOMCATFOLDER/tomcat.zip
TOMCATURL=http://ftp.unicamp.br/pub/apache/tomcat/tomcat-7/v7.0.69/bin/apache-tomcat-7.0.69.zip
TOMCAT_BIN=$TOMCATFOLDER/7.0.69
downloadDependences $TOMCATZIP $TOMCATURL $TOMCAT_BIN Tomcat
#chmod +x $TOMCATFOLDER/7.0.69/apache-tomcat-7.0.69/bin/catalina.sh
#Setting Ant Apache
ANTFOLDER=$DEVFOLDER/AntApache
ANTFOLDER_BIN=$ANTFOLDER/1.9.7
ANTURL=http://mirror.nbtelecom.com.br/apache//ant/binaries/apache-ant-1.9.7-bin.zip
ANTZIP=$ANTFOLDER/ant.zip
downloadDependences $ANTZIP $ANTURL $ANTFOLDER_BIN Ant_Apache
#Setting up ChromeDriver
CHROMEDRIVER=$DEVFOLDER/chromeDriver
CHROMEDRIVER_URL=http://chromedriver.storage.googleapis.com/2.21/chromedriver_mac32.zip
CHROMEDRIVER_ZIP=$CHROMEDRIVER/chromeDriver.zip
CHROMEDRIVER_FILE=$CHROMEDRIVER/chromedriver
downloadDependences $CHROMEDRIVER_ZIP $CHROMEDRIVER_URL $CHROMEDRIVER ChromeDriver
#Setting git standup
curl -s https://raw.githubusercontent.com/kamranahmedse/git-standup/master/installer.sh | sudo sh
printf "${GREEN} git-standup successful installed${NC}\n"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
#Creating symbolic link for config files
npm install --global git-recent
#Installing Git Open, https://github.com/paulirish/git-open
npm install --global git-open
ln -sf $(pwd)/.gitconfig ~/.gitconfig
ln -sf $(pwd)/.gitignore_global ~/.gitignore_global
ln -sf $(pwd)/.zshrc ~/.zshrc
ln -sf $(pwd)/.vimrc ~/.vimrc
ln -sf $(pwd)/.ideavimrc ~/.ideavimrc
if [ -d ~/.vim ]; then
rm -r ~/.vim
fi
ln -sf $(pwd)/.vim ~/.vim
ln -sf $(pwd)/.bash_profile ~/.bash_profile
ln -sf $(pwd)/.alias ~/.alias
ln -sf $(pwd)/.functions ~/.functions
vim +PlugInstall +PlugClean +qall