forked from imumesh18/dev-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitkraken.sh
executable file
·56 lines (46 loc) · 1.7 KB
/
gitkraken.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
#!/usr/bin/env bash
# Exit on error
set -e
sudo -v
# Install dependency for gitkraken
echo -e "\\033[1;92m**Installing dependencies for Gitkraken**\\033[1;92m\\033[0m"
sudo apt install libgnome-keyring-dev libcurl3
# Changes the text color to Teal.
echo -e "\\033[1;38;5;23m"
cat << "EOF"
___ _ _ _ _ ____ _ _ _ _
|_ _|_ __ ___| |_ __ _| | (_)_ __ __ _ / ___(_) |_| | ___ __ __ _| | _____ _ __
| || '_ \/ __| __/ _` | | | | '_ \ / _` | | | _| | __| |/ / '__/ _` | |/ / _ \ '_ \
| || | | \__ \ || (_| | | | | | | | (_| | | |_| | | |_| <| | | (_| | < __/ | | |
|___|_| |_|___/\__\__,_|_|_|_|_| |_|\__, | \____|_|\__|_|\_\_| \__,_|_|\_\___|_| |_|
|___/
EOF
# Changes the text color to default
echo -e "\\033[1;92m\\033[0m"
# Downloads gitkraken .deb package for ubuntu
echo -e "\\033[1;92m Downloading.....\\033[1;92m\\033[0m"
curl -sSL https://release.gitkraken.com/linux/gitkraken-amd64.deb -o /tmp/gitkraken-amd64.deb
# Installs gitkraken
sudo dpkg -i /tmp/gitkraken-amd64.deb
# Clean up
echo -e "\\033[1;93m**Cleaning Up the mess**\\033[1;93m\\033[0m"
rm -rf /tmp/gitkraken-amd64.deb
# Verify and exit installation
echo "Verifying Gitkraken installation... "
echo
GITKRAKEN_CHECK="$(gitkraken -v 1>&1)"
if [[ "$GITKRAKEN_CHECK" == *"Node started time"* ]]; then
echo -e "\\033[0;32mOK"
echo
echo "Gitkraken is successfully installed!"
echo
gitkraken -v
echo -e "\\033[0m"
exit 0
else
echo -e "\\033[0;31mFAILED"
echo
echo "$0: Lol! You broke my script dude :)XD, try to fix yourself else report an issues"
echo -e "\\033[0m"
exit 1
fi