Skip to content

Commit

Permalink
bug(envcreate default dir)
Browse files Browse the repository at this point in the history
  • Loading branch information
sathyamvellal committed Sep 17, 2015
1 parent 88064b8 commit 67a3fe8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bash/shenvrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@ if [ ! -d $SHENV_HOME ]; then
mkdir $SHENV_HOME
fi


function envcreate()
{
if [ -d $SHENV_HOME/$1 ]; then
echo "Environment already exists. Skipping ..."
else
mkdir $SHENV_HOME/$1 -p
if [ "$2" != "" ]; then
TO_BE_ENV_ROOT=$2
else
TO_BE_ENV_ROOT=$PWD
fi
echo \
"#!/bin/bash

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
Expand Down

0 comments on commit 67a3fe8

Please sign in to comment.