kristopolous / TickTick

JSON in your Bash scripts

Home Page:http://9ol.es/TheEmperorsNewClothes.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Solaris/BSD (simple change needed)

phansson opened this issue · comments

The TickTick.sh script depends on GNU grep so it will not work on Solaris unless the following is added to the script:

# Script needs the GNU version of 'grep' !!
# Set up some defaults:
GREP=grep
EGREP=egrep

if [ `uname` == "SunOS" ]; then
  GREP=ggrep
  EGREP=gegrep
fi

Then everywhere in the script where 'grep' or 'egrep' is used I've replaced with $GREP and $EGREP.

Note to those who may find this posting:

On Solaris 10 GNU grep is installed by default and lives in /usr/sfw/bin. Note that the binaries have a prefixed 'g'.

On Solaris 11 GNU grep is installed by default in global zones but doesn't (by default) make it into the local zones. To install in local zone simply do 'pkg install gnu-grep'. In Solaris 11 the GNU tool chain is already part of the default path but with a 'g' prefixed on the binary (except for the cases where there's no name clash)

This looks valid. I'll test it today.

the sunos system I have access to doesn't have these tools installed ... what a PITA. Are you using genuine SunOS 5.11 or one of the one of the spinoffs like openindiana or nexenta? I'll try to get a VirtualBox instance up of the system you are trying to use it on...

Otherwise if you can fork it, patch it, then send me the output of ./runall.sh in the tests folder, that would also be great.