From 5e328e3a9c0784521ae4170f7958183c352bae83 Mon Sep 17 00:00:00 2001 From: Moinak Ghosh Date: Fri, 11 Jul 2014 18:41:49 +0530 Subject: Solaris portability tweaks. --- tools/check_for_upgrade.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 8b8ecae03..1aba9a272 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -1,7 +1,13 @@ #!/bin/sh +PLAT=`uname -s` function _current_epoch() { - echo $(($(date +%s) / 60 / 60 / 24)) + if [ "$PLAT" = "SunOS" ] + then + echo $(($(perl -e 'print time') / 60 / 60 / 24)) + else + echo $(($(date +%s) / 60 / 60 / 24)) + fi } function _update_zsh_update() { -- cgit v1.2.3-70-g09d2