This repository was archived by the owner on Jan 9, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 55
55
VERSION_DATA=$( download_file " http://www.pocketmine.net/api/?channel=$CHANNEL " )
56
56
57
57
VERSION=$( echo " $VERSION_DATA " | grep ' "version"' | cut -d ' :' -f2- | tr -d ' ",' )
58
- BASE_VERSION=$( echo " $VERSION " | sed -r ' s/([A-Za-z0-9_\.]*).*/\1/' )
59
58
BUILD=$( echo " $VERSION_DATA " | grep build | cut -d ' :' -f2- | tr -d ' ",' )
60
59
API_VERSION=$( echo " $VERSION_DATA " | grep api_version | cut -d ' :' -f2- | tr -d ' ",' )
61
60
VERSION_DATE=$( echo " $VERSION_DATA " | grep ' "date"' | cut -d ' :' -f2- | tr -d ' ",' )
62
- VERSION_DATE_STRING=$( date --date=" @$VERSION_DATE " )
63
61
VERSION_DOWNLOAD=$( echo " $VERSION_DATA " | grep ' "download_url"' | cut -d ' :' -f2- | tr -d ' ",' )
62
+ if [ " $( uname -s) " == " Darwin" ]; then
63
+ BASE_VERSION=$( echo " $VERSION " | sed -E ' s/([A-Za-z0-9_\.]*).*/\1/' )
64
+ VERSION_DATE_STRING=$( date -j -f " %s" $VERSION_DATE )
65
+ else
66
+ BASE_VERSION=$( echo " $VERSION " | sed -r ' s/([A-Za-z0-9_\.]*).*/\1/' )
67
+ VERSION_DATE_STRING=$( date --date=" @$VERSION_DATE " )
68
+ fi
64
69
65
70
if [ " $VERSION " == " " ]; then
66
71
echo " [ERROR] Couldn't get the latest PocketMine-MP version"
You can’t perform that action at this time.
0 commit comments