Added install.sh

This commit is contained in:
adamcruz 2018-05-09 17:18:34 +08:00
parent e829f20289
commit 1d3883b1ab

35
install.sh Normal file
View File

@ -0,0 +1,35 @@
#!/bin/bash
cd /opt
# Get Latest GitKraken
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
# Extract
tar -xvzf gitkraken-amd64.tar.gz
# Remove tar.gz
rm gitkraken-amd64.tar.gz
# Add gitkraken to PATH
echo "export PATH=\$PATH:/opt/gitkraken" >> ~/.bashrc
source ~/.bashrc
# Download gitkraken launcher icon
wget https://git.spectre5.com/adamcruz/install-gitkraken/raw/commit/e829f20289e0761e8b98bd5d86d36a4b4b0e24d0/gitkraken_logo.png
mv gitkraken_logo.png ./gitkraken/icon.png
# Create desktop entry
sudo touch /usr/share/applications/gitkraken.desktop
# copy the following contents into gitkraken.desktop file:
echo "
[Desktop Entry]
Name=GitKraken
Comment=Git Flow
Exec=/opt/gitkraken/gitkraken
Icon=/opt/gitkraken/icon.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;Development;" | sudo tee -a /usr/share/applications/gitkraken.desktop >/dev/null