Sha256: 08d6da671f9af97f505e571ba8ea1f95fd1d45df16c3ae672866eb81975a5559

Contents?: true

Size: 957 Bytes

Versions: 10

Compression:

Stored size: 957 Bytes

Contents

#!/bin/sh

usershell=$(dscl localhost -read /Local/Default/Users/$USER shell | sed -e 's/[^ ]* //')

startup_files() {
  case $(basename $usershell) in
    zsh)
      echo ".zlogin .zshrc .zprofile .zshenv"
      ;;
    bash)
      echo ".bashrc .bash_profile .bash_login .profile"
      ;;
    *)
      echo ".bash_profile .zshrc .profile"
      ;;
  esac
}

install_path() {
  for file in $(startup_files); do
    [ -f $HOME/$file ] || continue
    (grep "Added by the Quandl" $HOME/$file >/dev/null) && break

    cat <<MESSAGE >>$HOME/$file

### Added by the Quandl Toolbelt
export PATH="/usr/local/quandl/bin:\$PATH"
MESSAGE

    # done after we add to one file
    break
  done
}

# if the toolbelt is not returned by `which`, let's add to the PATH
case $(which quandl) in
  /usr/bin/quandl|/usr/local/quandl/bin/quandl)
    ;;
  *)
    install_path
    ;;
esac

# symlink binary to /usr/bin/quandl
ln -sf /usr/local/quandl/bin/quandl /usr/bin/quandl

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
quandl-0.3.7 dist/resources/pkg/postinstall
quandl-0.3.6 dist/resources/pkg/postinstall
quandl-0.3.4 dist/resources/pkg/postinstall
quandl-0.3.3 dist/resources/pkg/postinstall
quandl-0.3.0 dist/resources/pkg/postinstall
quandl-0.2.27 dist/resources/pkg/postinstall
quandl-0.2.26 dist/resources/pkg/postinstall
quandl-0.2.25 dist/resources/pkg/postinstall
quandl-0.2.24 dist/resources/pkg/postinstall
quandl-0.2.22 dist/resources/pkg/postinstall