This code is not working, but I don't know what's wrong. If I only use single brackets the string isn't compared right.
#!/bin/bash
forceupdate=false
currentVersion=520-19
latestVersion=520-19
if [[ "$latestVersion" > "$currentVersion" -o forceupdate ]]
then
echo -e "\nupdate!\n"
else
echo -e "\nno update!\n"
fi
[is a different command.-ois fine. That's not the problem.