...

Text file src/github.com/alecthomas/chroma/bin/activate-hermit

Documentation: github.com/alecthomas/chroma/bin

     1#!/bin/bash
     2# This file must be used with "source bin/activate-hermit" from bash or zsh.
     3# You cannot run it directly
     4
     5if [ "${BASH_SOURCE-}" = "$0" ]; then
     6  echo "You must source this script: \$ source $0" >&2
     7  exit 33
     8fi
     9
    10BIN_DIR="$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")"
    11if "${BIN_DIR}/hermit" noop > /dev/null; then
    12  eval "$("${BIN_DIR}/hermit" activate "${BIN_DIR}/..")"
    13
    14  if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ]; then
    15      hash -r 2>/dev/null
    16    fi
    17
    18    echo "Hermit environment $("${HERMIT_ENV}"/bin/hermit env HERMIT_ENV) activated"
    19fi

View as plain text