#!/usr/bin/env bash
set -e

case `uname` in
 "Darwin") {
     if !(which greadlink > /dev/null); then
        echo 'ERROR: greadlink not found: GNU utils required for Mac. You may use homebrew to install them: brew install coreutils gnu-sed'
        exit 1
     fi
     CCSH_PATH=$(greadlink -f "$0")
    } ;;
 *)  CCSH_PATH=$(readlink -f "$0") ;;
esac

echo
echo ">> This ccsh file is deprecated! Use bin/ccsh instead. <<" >&2
echo

bin/ccsh "$@"
