I had to try to make a code to automate steamcmd
but it always gives me the following error:
syntax error near unexpected token 'fi'
Code:
STEAMCMDDOWN="https://steamcdn-a.akamihd.net/client/installer/steamcmd_linux.tar.gz"
STEAMDIR="~/steamcmd"
if [! -d "$STEAMDIR" ]; then
mkdir "~/steamcmd"
cd "~/steamcmd"
else
if [! -f "steamcmd.sh" ]; then
wget "$STEAMCMDDOWN"
tar +xf "steamcmd_linux.tar.gz"
else
echo "steamcmd installed"
fi
exit
fi
Can someone please explain why I'm getting this error?