Skip to content

Commit

Permalink
Merge pull request #10 from Incrementing/master
Browse files Browse the repository at this point in the history
[macOS] Fix checking minor version instead of major version (Big Sur support)
  • Loading branch information
zevilz authored Mar 9, 2021
2 parents 5ef3ff9 + a63d548 commit 8283612
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions zImageOptimizer.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Simple image optimizer for JPEG, PNG and GIF images.
# URL: https://github.com/zevilz/zImageOptimizer
# Author: Alexandr "zEvilz" Emshanov
Expand Down Expand Up @@ -180,7 +180,7 @@ installDeps()
PLATFORM_ARCH=$(getconf LONG_BIT)

PLATFORM_VERSION="$(defaults read loginwindow SystemVersionStampAsString)"
if [[ $(echo $PLATFORM_VERSION | cut -d '.' -f2) -ge $MIN_VERSION_MACOS ]]; then
if [[ $(echo $PLATFORM_VERSION | cut -d '.' -f1) -ge $MIN_VERSION_MACOS ]]; then
PLATFORM_SUPPORT=1
fi

Expand Down Expand Up @@ -455,8 +455,8 @@ installDeps()
fi

else
echo "Your platform not supported! Please install dependaces manually."
echo "Info: $GIT_URL"
echo "Your platform is not supported! Please install dependaces manually."
echo "Info: $GIT_URL#manual-installing-dependences"
echo
fi
}
Expand Down Expand Up @@ -1244,7 +1244,7 @@ MIN_VERSION_FEDORA=24
MIN_VERSION_RHEL=6
MIN_VERSION_CENTOS=6

# Register min version MacOS (second digit; ex. 10.12.2 == 12).
# Register min version MacOS.
MIN_VERSION_MACOS=10

# Register min version of FreeBSD.
Expand Down

0 comments on commit 8283612

Please sign in to comment.