-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.sh
38 lines (38 loc) · 897 Bytes
/
init.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
#!/bin/bash
isMac=0
if [[ "$OSTYPE" == "darwin"* ]]; then
isMac=1
echo "rilevato Mac"
if [[ $(brew -v) == "" ]]; then
echo -e 'prima di continuare installare brew: https://brew.sh/index_ite'
exit
fi
elif [[ "$OSTYPE" == "linux-gnu" ]]; then
echo "rilevato GNU Linux"
else
echo "sistema funzionante solo per Mac o Linux"
exit
fi
if [[ $(git --version) == "" ]]; then
echo "installo git..."
if [[ "$isMac" == "1" ]]; then
brew install git
else
sudo apt-get install git
fi
fi
if [[ $(git flow version) == "" ]]; then
echo "installo git-flow..."
if [[ "$isMac" == "1" ]]; then
brew install git-flow-avh
else
sudo apt-get install git-flow
fi
fi
chmod +x gim
if [[ "$isMac" == "1" ]]; then
cp gim /usr/local/bin/gim
else
sudo cp gim /usr/local/bin/gim
fi
echo "installazione terminata!"