# This file must be used with "source activate"
# cannot run it directly

deactivate () {
    if [ -n "${_OLD_PS1}" ] ; then # True if _OLD_PS1 not None
        PS1="${_OLD_PS1}"
        unset _OLD_PS1
    fi

    # Self destruct
    if [ ! "$1" = "nondestructive" ] ; then
        unset -f deactivate
    fi
}

# unset _OLD_PS1 when run script twice
deactivate nondestructive

_OLD_PS1="$PS1"

PS1="\$(</tmp/btcprompt) $PS1"

export PS1