Browse Source

changes to prereqs

Nate Brady 8 years ago
parent
commit
d04890bfd9
2 changed files with 6 additions and 32 deletions
  1. 0 8
      toolset/setup/linux/bash_functions.sh
  2. 6 24
      toolset/setup/linux/prerequisites.sh

+ 0 - 8
toolset/setup/linux/bash_functions.sh

@@ -102,14 +102,6 @@ fw_depends() {
     wd=$(pwd)
     relative_wd=\$FWROOT${wd#$FWROOT}
 
-    # Check that the prerequisites have been loaded
-    RETCODE=$(fw_exists ${IROOT}/prerequisites.installed)
-    [ "$RETCODE" == 0 ] || { \
-      # Load environment variables
-      echo Installing prerequisites
-      source $FWROOT/toolset/setup/linux/prerequisites.sh
-      touch $IROOT/prerequisites.installed; }
-
     # Find and run the installer.sh file for this dependency
     # Turn on some bash options before sourcing: 
     #   - (x) errtrace : Print commands before they are run

+ 6 - 24
toolset/setup/linux/prerequisites.sh

@@ -3,12 +3,7 @@
 set -x
 export DEBIAN_FRONTEND=noninteractive
 
-source $FWROOT/toolset/setup/linux/bash_functions.sh
-
-RETCODE=$(fw_exists fwbm_prereqs_installed)
-[ ! "$RETCODE" == 0 ] || { \
-  echo "Prerequisites installed!"; 
-  return 0; }
+source ./toolset/setup/linux/bash_functions.sh
 
 # One -q produces output suitable for logging (mostly hides
 # progress indicators)
@@ -42,27 +37,14 @@ sudo pip install colorama==0.3.1
 sudo pip install progressbar==2.2
 sudo pip install requests
 
-# Stop permanently overwriting people's files just
-# for trying out our software!
-RETCODE=$(fw_exists ~/.bash_profile.bak)
-[ ! "$RETCODE" == 0 ] || { \
-  echo "Backing up your original ~/.bash_profile, ~/.profile, ~/.bashrc"
-  mv ~/.bash_profile ~/.bash_profile.bak || true
-  mv ~/.profile ~/.profile.bak || true
-  mv ~/.bashrc ~/.bashrc.bak || true
-}
-
 sudo sh -c "echo '*               -    nofile          65535' >> /etc/security/limits.conf"
 sudo sh -c "echo '*            hard    rtprio             99' >> /etc/security/limits.conf"
 sudo sh -c "echo '*            soft    rtprio             99' >> /etc/security/limits.conf"
 
 # Create a tfb command alias for running the toolset
 # For now, this still ensures you have to be in the framework root to run it
-alias tfb="./toolset/run-tests.py"
-echo 'alias tfb="./toolset/run-tests.py"' >> ~/.bashrc
-
-# Sudo in case we don't have permissions on IROOT
-sudo touch fwbm_prereqs_installed
-
-# Ensure everyone can see the file
-sudo chmod 775 fwbm_prereqs_installed
+sudo tee /etc/profile.d/tfb.sh <<EOF
+#!/bin/bash
+alias tfb="$(pwd)/toolset/run-tests.py"
+EOF
+source /etc/profile.d/tfb.sh