-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy path02-steamapps.sh
More file actions
executable file
·39 lines (32 loc) · 911 Bytes
/
02-steamapps.sh
File metadata and controls
executable file
·39 lines (32 loc) · 911 Bytes
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
#!/bin/bash
#
# This script will make a link to steamapps in /opt/steamapps
#
if [ $EUID == 0 ]; then
echo "This script must not be run as root"
exit
fi
if ! [ $(getent group catbots) ]; then
echo "Please, run scripts in the right order."
exit
fi
if [ "$#" -ne 1 ]; then
echo "Usage:"
echo " $0 \"/path/to/steamapps\""
exit
fi
# Check if this path contains file specific to Team Fortress 2
if ! [ -e "$1/common/Team Fortress 2/tf/gameinfo.txt" ]; then
echo "Specified path doesn't point to steamapps or you don't have Team Fortress 2 installed"
exit
fi
echo "Is this the correct path?"
echo "$1"
read -p "Press enter to continue or Ctrl+C (close) to stop."
sudo ln -s "$1" "/opt/steamapps"
sudo chown -h $USER:catbots "/opt/steamapps"
sudo chown -R $USER:catbots "/opt/steamapps"
sudo chmod -R g+rwx "/opt/steamapps"
sudo chmod +x "/opt"
sudo chmod +x "/opt/steamapps"
sudo chmod -R go+X "$1"