5f38a537cef0d79c9d53c01e8f88d150e985c70a

Author
Moinak Ghosh <moinakg@gmail.com>
Committer
Moinak Ghosh <moinakg@gmail.com>
Date

Message

Update Solaris changes to use OSTYPE and zsh datetime  module.

Diff

 1diff --git a/lib/completion.zsh b/lib/completion.zsh
 2index faea36118d56377ec6163fa26334d156bca781a4..83b6efb66d606b43869994741d0c897856956fd9 100644
 3--- a/lib/completion.zsh
 4+++ b/lib/completion.zsh
 5@@ -25,7 +25,7 @@ bindkey -M menuselect '^o' accept-and-infer-next-history
 6 
 7 zstyle ':completion:*:*:*:*:*' menu select
 8 zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
 9-if [ "$PLAT" = "SunOS" ]
10+if [ "$OSTYPE[0,7]" = "solaris" ]
11 then
12   zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm"
13 else
14diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
15index 4683c2bc0fff689cfe45939f421296102b9b2b61..c217b91bbb57493b91263dc196e75caaec81c5a5 100644
16--- a/oh-my-zsh.sh
17+++ b/oh-my-zsh.sh
18@@ -1,4 +1,3 @@
19-PLAT=`uname -s`
20 # Check for updates on initial load...
21 if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then
22   /usr/bin/env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $ZSH/tools/check_for_upgrade.sh
23diff --git a/plugins/colored-man/colored-man.plugin.zsh b/plugins/colored-man/colored-man.plugin.zsh
24index 4956f4346deae25eaabd612197415620bc5acbe0..5c613f49d1fee1832d81ca7d3f0c42abc9d0a1f3 100644
25--- a/plugins/colored-man/colored-man.plugin.zsh
26+++ b/plugins/colored-man/colored-man.plugin.zsh
27@@ -1,4 +1,4 @@
28-if [ "${PLAT}" = "SunOS" ]
29+if [ "$OSTYPE[0,7]" = "solaris" ]
30 then
31 	if [ ! -x ${HOME}/bin/nroff ]
32 	then
33diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
34index 1aba9a2727a6b7b0365d342424a975b7b57bd2f8..0e8845ab4c2aefd575276eaa8eae2fb99bb58b17 100644
35--- a/tools/check_for_upgrade.sh
36+++ b/tools/check_for_upgrade.sh
37@@ -1,13 +1,9 @@
38-#!/bin/sh
39+#!/usr/bin/env zsh
40+
41+zmodload zsh/datetime
42 
43-PLAT=`uname -s`
44 function _current_epoch() {
45-  if [ "$PLAT" = "SunOS" ]
46-  then
47-    echo $(($(perl -e 'print time') / 60 / 60 / 24))
48-  else
49-    echo $(($(date +%s) / 60 / 60 / 24))
50-  fi
51+  echo $EPOCHSECONDS
52 }
53 
54 function _update_zsh_update() {