#!/bin/bash
# bash_functions.sh
# Caleb Evans

# Reloads entire shell, including .bash_profile and any activated virtualenv
reload() {
	deactivate 2> /dev/null
	exec $SHELL -l
}

# Makes new Python virtualenv in designated virtualenv home
mkenv() {
	local envname="$(basename "$PWD")"
	pushd "$WORKON_HOME" > /dev/null
	virtualenv -p "$1" "$envname"
	popd > /dev/null
	# Activate virtualenv and install pip requirements if possible
	source "$WORKON_HOME/$envname"/bin/activate
	pip install -r requirements.txt 2> /dev/null
}

# Removes existing Python virtualenv
rmenv() {
	rm -r "$WORKON_HOME"/"$(basename "$PWD")"
}

#!/bin/bash
# bash_functions.sh
# Caleb Evans

# Reloads entire shell, including .bash_profile and any activated virtualenv
reload() {
	deactivate 2> /dev/null
	exec $SHELL -l
}

# Makes new Python virtualenv in designated virtualenv home
mkenv() {
	local env_name="$(basename "$PWD")"
	pushd "$WORKON_HOME" > /dev/null
	virtualenv -p "$1" "$env_name"
	popd > /dev/null
}

# Removes existing Python virtualenv
rmenv() {
	rm -r "$WORKON_HOME"/"$(basename "$PWD")"
}

--- 
+++ 
@@ -10,13 +10,10 @@
 
 # Makes new Python virtualenv in designated virtualenv home
 mkenv() {
-	local envname="$(basename "$PWD")"
+	local env_name="$(basename "$PWD")"
 	pushd "$WORKON_HOME" > /dev/null
-	virtualenv -p "$1" "$envname"
+	virtualenv -p "$1" "$env_name"
 	popd > /dev/null
-	# Activate virtualenv and install pip requirements if possible
-	source "$WORKON_HOME/$envname"/bin/activate
-	pip install -r requirements.txt 2> /dev/null
 }
 
 # Removes existing Python virtualenv
Update mkenv function to also install pip requirements
