summarylogtreecommitdiffstats
path: root/steamcmd
blob: 4a83a2d34a8aff2a757e87611110d92ac4bfc351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# Copyright (C) 2015 Alexandre Detiste <alexandre@detiste.be>
# License: MIT

# create a fake Steam installation to avoid
# that steamcmd uses "/home/$user/Steam" instead
if [ ! -e ~/.steam ]
then
    mkdir -p ~/.steam/appcache/
    mkdir -p ~/.steam/config/
    mkdir -p ~/.steam/logs/
    mkdir -p ~/.steam/SteamApps/common/
    ln -s ~/.steam ~/.steam/root
    ln -s ~/.steam ~/.steam/steam
fi

if [ ! -e ~/.steam/steamcmd ]
then
    mkdir -p ~/.steam/steamcmd/linux32
    # steamcmd will replace these files with newer ones itself on first run
    cp /usr/lib/steamcmd/steamcmd.sh ~/.steam/steamcmd/steamcmd.sh
    cp /usr/lib/steamcmd/linux32/steamcmd ~/.steam/steamcmd/linux32/steamcmd
fi
exec ~/.steam/steamcmd/steamcmd.sh "$@"