Browse Source

Another stab at knowing the distribution

msmith-techempower 10 years ago
parent
commit
de47796bb4

+ 5 - 7
config/benchmark_profile

@@ -12,13 +12,11 @@ IROOT=${FWROOT}/installs
 
 
 # Determine which OS we are using and set the appropriate variables
 # Determine which OS we are using and set the appropriate variables
 source /etc/lsb-release
 source /etc/lsb-release
-TFB_UBUNTU12=0
-TFB_UBUNTU14=0
-if [[ $DISTRIB_RELEASE == 14.* ]]; then
-  TFB_UBUNTU14=1
-elif [[ $DISTRIB_RELEASE == 12.* ]]; then
-  TFB_UBUNTU12=1
-fi
+export TFB_DISTRIB_ID=$DISTRIB_ID
+export TFB_DISTRIB_RELEASE=$DISTRIB_RELEASE
+export TFB_DISTRIB_CODENAME=$DISTRIB_CODENAME
+export TFB_DISTRIB_DESCRIPTION=$DISTRIB_DESCRIPTION
+
 
 
 export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
 export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
 export RESIN_HOME=${IROOT}/resin-4.0.41
 export RESIN_HOME=${IROOT}/resin-4.0.41

+ 1 - 1
toolset/setup/linux/database.sh

@@ -86,7 +86,7 @@ rm create.sql
 # Postgres
 # Postgres
 ##############################
 ##############################
 echo "Setting up Postgres database"
 echo "Setting up Postgres database"
-if [ $TFB_UBUNTU12 -eq 1 ]; then
+if [ "$TFB_DISTRIB_CODENAME" == "precise" ]; then
   echo "WARNING: Force upgrading Postgres for Ubuntu 12.04"
   echo "WARNING: Force upgrading Postgres for Ubuntu 12.04"
   sudo apt-get remove -y postgresql postgresql-9.1 postgresql-client-9.1
   sudo apt-get remove -y postgresql postgresql-9.1 postgresql-client-9.1
 
 

+ 2 - 3
toolset/setup/linux/frameworks/wt.sh

@@ -20,10 +20,9 @@ RETCODE=$(fw_exists wt)
 
 
 # Instead of compiling from source, just use apt to install onto 
 # Instead of compiling from source, just use apt to install onto 
 # host machine
 # host machine
-source /etc/lsb-release
-if [ $TFB_UBUNTU14 -eq 1 ]; then
+if [ "$TFB_CODENAME" == "trusty" ]; then
     sudo apt-get -y install libboost1.54-all-dev
     sudo apt-get -y install libboost1.54-all-dev
-elif [ $TFB_UBUNTU12 -eq 1 ]; then
+elif [ "$TFB_CODENAME" == "precise" ]; then
     sudo apt-get -y install libboost1.48-all-dev
     sudo apt-get -y install libboost1.48-all-dev
 fi
 fi