I had to try to make a code to automate steamcmd but I always got this error syntax error near unexpected token 'fi' , could someone help me?
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