Sleepyfx's picture
download
raw
1.37 kB
# Same as deactivate in "<venv>/bin/activate"
deactivate () {
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
PATH="${_OLD_VIRTUAL_PATH:-}"
export PATH
unset _OLD_VIRTUAL_PATH
fi
if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
export PYTHONHOME
unset _OLD_VIRTUAL_PYTHONHOME
fi
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
hash -r 2> /dev/null
fi
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
PS1="${_OLD_VIRTUAL_PS1:-}"
export PS1
unset _OLD_VIRTUAL_PS1
fi
unset VIRTUAL_ENV
unset VIRTUAL_ENV_PROMPT
if [ ! "${1:-}" = "nondestructive" ] ; then
unset -f deactivate
fi
}
# Get the directory of the current script
SCRIPT_DIR=$(dirname "$0")
# Construct the path to envVars.txt relative to the script directory
ENV_FILE="$SCRIPT_DIR/envVars.txt"
# Read the JSON file and set the variables
TEMP_PS1=$(grep '^PS1=' $ENV_FILE | cut -d '=' -f 2)
TEMP_PATH=$(grep '^PATH=' $ENV_FILE | cut -d '=' -f 2)
TEMP_PYTHONHOME=$(grep '^PYTHONHOME=' $ENV_FILE | cut -d '=' -f 2)
# Initialize the variables required by deactivate function
_OLD_VIRTUAL_PS1="${TEMP_PS1:-}"
_OLD_VIRTUAL_PATH="$TEMP_PATH"
if [ -n "${PYTHONHOME:-}" ] ; then
_OLD_VIRTUAL_PYTHONHOME="${TEMP_PYTHONHOME:-}"
fi
deactivate
bash

Xet Storage Details

Size:
1.37 kB
·
Xet hash:
95f950415e31c6df1e3d57295d4405963ba252250ecd0b329c68069369ae0a47

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.