From 88064b886e12318124e672b8ea446fc771370ec8 Mon Sep 17 00:00:00 2001 From: Sathyam Vellal Date: Sun, 22 Feb 2015 15:24:55 +0530 Subject: [PATCH] If ENV_ROOT provided is null, defaults to PWD --- bash/shenvrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bash/shenvrc b/bash/shenvrc index 3150615..f47af43 100644 --- a/bash/shenvrc +++ b/bash/shenvrc @@ -20,7 +20,12 @@ function envcreate() echo \ "#!/bin/bash -ENV_ROOT=\"$2\" # The root directory of the environment +if [ "$2" != "" ]; then + TO_BE_ENV_ROOT=$2 +else + TO_BE_ENV_ROOT=$PWD +fi +ENV_ROOT=\"$TO_BE_ENV_ROOT\" # The root directory of the environment ### Enter your variables, aliases and functions, etc in the respective arrays function envinit() {