MorphOS Developer
Posts: 576 from 2003/2/24
From: finland, the l...
@papiosaur
I would avoid using integer value derived like that: The problem is that 310 (3.10) would then be considered newer than 40 (4.0). This is bad.
You should rather use version command that can compare both version and revision individually.
Code:
set VER=3
set REV=8
version >NIL: path/to/wayfarer version $VER revision $REV
if warn
echo "Wayfarer is older than $VER.$REV"
else
echo "Wayfarer is version $VER.$REV or newer"
endif