Commit 3695bb91 authored by Rhydian Lewis's avatar Rhydian Lewis
Browse files

Changed setting up og VLprofile as issue if previous install has been deleted

parent 7eb9da93
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -13,14 +13,10 @@
set -e
VL_DIR=$1
USER_HOME=$2
### Check if VirtualLab is in PATH
if [[ $PATH =~ $VL_DIR ]]; then
  echo "VirtualLab is already in PATH."
else
  ### If not, add VirtualLab to PATH
  echo "Adding VirtualLab to PATH."

echo "Creating ${USER_HOME}/.VLprofile "
# Add VL_DIR to VLProfile so that different parts of install can be run seperately
  echo 'export VL_DIR="'$VL_DIR'"' >> $USER_HOME/.VLprofile
echo 'export VL_DIR="'$VL_DIR'"' > $USER_HOME/.VLprofile

echo 'if [[ ! $PATH =~ "'$VL_DIR'" ]]; then' >> $USER_HOME/.VLprofile

@@ -28,7 +24,6 @@ else
echo 'fi'  >> $USER_HOME/.VLprofile

export PATH="$VL_DIR/bin:$PATH"
fi

### ~/.bashrc doesn't get read by subshells in ubuntu.
### Workaround: store additions to env PATH in ~/.VLprofile & source in bashrc.
+2 −7
Original line number Diff line number Diff line
@@ -13,12 +13,8 @@
set -e
VL_DIR=$1
USER_HOME=$2
### Check if VirtualLab is in PATH
if [[ $PATH =~ $VL_DIR ]]; then
  echo "VirtualLab is already in PATH."
else
  ### If not, add VirtualLab to PATH
  echo "Adding VirtualLab to PATH."

echo "Creating ${USER_HOME}/.VLprofile "
# Add VL_DIR to VLProfile so that different parts of install can be run seperately
echo 'export VL_DIR="'$VL_DIR'"' >> $USER_HOME/.VLprofile

@@ -28,7 +24,6 @@ else
echo 'fi'  >> $USER_HOME/.VLprofile

export PATH="$VL_DIR/bin:$PATH"
fi

### ~/.bashrc doesn't get read by subshells in ubuntu.
### Workaround: store additions to env PATH in ~/.VLprofile & source in bashrc.