Skip to content
This repository was archived by the owner on Feb 11, 2019. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions res/activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@
# File activates VirtPHP for BASH
##

# Check to see if a Virtual Environment and ask them to exit
if [ "$VIRTUAL_ENV" ] ; then
echo "You are currently running a virtualenv session: $VIRTUAL_ENV"
echo "Please exit this session before starting a virtPHP session."
return 0
fi

# Check to see if switching virtPHP Environments
if [ "$VIRTPHP_ENV_PATH" ] ; then
read -p "You are currently in a virtPHP session. Do you want to switch? y/n " yn
case $yn in
NO) return 0;;
No) return 0;;
n) return 0;;
no) return 0;;
N) return 0;;
esac
fi

# Function to make sure used variables are removed
# before environment is setup
Expand Down