-
Notifications
You must be signed in to change notification settings - Fork 3
/
INSTALL.sh
54 lines (48 loc) · 1.72 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
#!/bin/bash
# =========================================================================
# ---[SLSK - Build/Install Script]---
# Copyright (C) 2017 Supremist (aka supremesonicbrazil)
# This file is part of Steam Linux Swiss Knife (or SLSK for short).
# Steam Linux Swiss Knife is available under the GNU GPL v3.0 license. See the
# accompanying COPYING file for more details.
# =========================================================================
# Checking if running as sudo
if [ $UID = 0 ]
then
# Compiling from source code in a temporary folder
mkdir bin
qmake -o ./bin/Makefile ./src/SteamLinuxSwissKnife.pro
cd bin
make
cd ..
# Moving and copying stuff to the right places
rm -r /opt/SLSK
mkdir /opt/SLSK
mv ./bin/SteamLinuxSwissKnife /opt/SLSK/SteamLinuxSwissKnife
cp ./src/SteamLinuxGames.db /opt/SLSK/SteamLinuxGames.db
cp -r ./img /opt/SLSK/img
rm -r ./bin
# Creating desktop entry
echo '[Desktop Entry]
Version=1.0
Name=Steam Linux Swiss Knife
Comment=Backup automation for Steam games, saves and configs
Exec=/opt/SLSK/SteamLinuxSwissKnife
Icon=/opt/SLSK/img/SLSK_icon.png
Terminal=false
Type=Application
Categories=Utility;Application;' > ./Steam\ Linux\ Swiss\ Knife.desktop
# Setting desktop shortcut as executable
chmod +x ./Steam\ Linux\ Swiss\ Knife.desktop
# Finishing
clear
echo "Done! Steam Linux Swiss Knife was successfully installed in '/opt/SLSK'."
echo "If you want to uninstall it anytime, just do a 'sudo rm -r /opt/SLSK'."
echo "Enjoy!"
echo "--------------------------------------------------------------------------------"
else
echo "Please run this script as sudo."
echo "Aborting..."
echo "--------------------------------------------------------------------------------"
exit
fi