More robust version checking

License: MIT
Signed-off-by: Jonathan Dahan <jonathan@jonathan.is>
This commit is contained in:
Jonathan Dahan 2015-12-17 18:17:39 -05:00
parent 62ba5eb913
commit 77bfa9d145

View File

@ -23,7 +23,7 @@ if [ $? ]; then
fi
echo Loading ipfs-daemon
if [[ `sw_vers -productVersion` == 10.1* ]]; then
if (( `sw_vers -productVersion | cut -d'.' -f2` > 9 )); then
sudo chown root "$dest_dir/$plist"
sudo launchctl bootstrap system "$dest_dir/$plist"
else