Bash_Scripts/CentOS/Install-SteamCMD.bash

28 lines
667 B
Bash
Raw Permalink Normal View History

2021-07-17 23:52:05 -05:00
#!/bin/bash --posix
set -e
2021-12-31 13:13:58 -06:00
STEAM_DIRECTORY="${1:-"/usr/local/share/steam/"}"
if which apt > /dev/null 2>&1; then
sudo apt -y install lib32gcc1
elif which dnf > /dev/null 2>&1; then
dnf install -y glibc.i686 libstdc++.i686 tmux
else
echo "Unable to use either dnf or apt..., exiting" >&2
exit 1
fi
2021-07-17 23:52:05 -05:00
mkdir -p "${STEAM_DIRECTORY}"
cd "${STEAM_DIRECTORY}"
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
chmod -R 755 "${STEAM_DIRECTORY}"
cat << __EOF__ > /usr/local/bin/steamcmd
#!/bin/bash
${STEAM_DIRECTORY}/steamcmd.sh "\${@}"
__EOF__
2021-07-17 23:52:05 -05:00
2021-08-17 20:21:33 -05:00
chmod 755 /usr/local/bin/steamcmd
2021-08-27 06:55:00 -05:00
/usr/local/bin/steamcmd +quit