Skip to content

Instantly share code, notes, and snippets.

@ThomasAunvik
Created October 17, 2024 17:13
Show Gist options
  • Save ThomasAunvik/261672dd6de7f9feb71ae9b14d0bf050 to your computer and use it in GitHub Desktop.
Save ThomasAunvik/261672dd6de7f9feb71ae9b14d0bf050 to your computer and use it in GitHub Desktop.
#!/bin/bash +x
deactivate () {
if [ -n "${_OLD_PATH:-}" ] ; then
export PATH="${_OLD_PATH}"
unset _OLD_PATH
fi
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
PS1="${_OLD_VIRTUAL_PS1}"
export PS1
unset _OLD_VIRTUAL_PS1
fi
}
deactivate
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
export PROJECT_DIR="$DIR"
export _OLD_PATH="$PATH"
export PATH="$DIR/bin:$PATH"
_OLD_VIRTUAL_PS1="${PS1:-}"
PS1="(ProjectName) ${PS1:-}"
export PS1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment