Changeset 2970


Ignore:
Timestamp:
Apr 5, 2020 5:07:34 PM (3 months ago)
Author:
unxusr
Message:

scripts to launch binaries and set library paths

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.travis.yml

    r2968 r2970  
    8989    if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_DIST" == "precise" ]];
    9090    then
     91      # adding required libraries
    9192      cp /usr/lib/lapack/liblapack.so.3gf lib/
    9293      cp /usr/lib/x86_64-linux-gnu/libgfortran.so.5 lib/
     
    9899      cp /lib/x86_64-linux-gnu/libtinfo.so.5 lib/
    99100      cp /usr/lib/x86_64-linux-gnu/libquadmath.so.0 lib/
     101      # CBC Launcher script
     102      mv bin/cbc bin/cbc.bin
     103      echo "#! /bin/sh"
     104      echo "# Wrapper to launch CBC and set the library path in Linux" > bin/cbc
     105      echo "SCRIPTPATH=\"$( cd \"$(dirname \"$0\")\" >/dev/null 2>&1 ; pwd -P )\"" >> bin/cbc
     106      echo "LIB_PATH=$(echo $SCRIPTPATH | sed -e 's/\/bin$/\/lib/g')" >> bin/cbc
     107      echo "LIB_PATH=$(echo $LIB_PATH | sed -e 's/\/bin\/$/\/lib/g')" >> bin/cbc
     108      echo "OLD_LP=$LD_LIBRARY_PATH" >> bin/cbc
     109      echo "export LD_LIBRARY_PATH=$LIB_PATH:$LD_LIBRARY_PATH" >> bin/cbc
     110      echo "${SCRIPTPATH}/cbc.bin" >> bin/cbc
     111      echo "export LD_LIBRARY_PATH=$OLD_LP" >> bin/cbc
     112      echo "exit $?" >> bin/cbc
     113      chmod a+rx bin/cbc
     114      # CLP Launcher script
     115      mv bin/clp bin/clp.bin
     116      echo "#! /bin/sh"
     117      echo "# Wrapper to launch CLP and set the library path in Linux" > bin/clp
     118      echo "SCRIPTPATH=\"$( cd \"$(dirname \"$0\")\" >/dev/null 2>&1 ; pwd -P )\"" >> bin/clp
     119      echo "LIB_PATH=$(echo $SCRIPTPATH | sed -e 's/\/bin$/\/lib/g')" >> bin/clp
     120      echo "LIB_PATH=$(echo $LIB_PATH | sed -e 's/\/bin\/$/\/lib/g')" >> bin/clp
     121      echo "OLD_LP=$LD_LIBRARY_PATH" >> bin/clp
     122      echo "export LD_LIBRARY_PATH=$LIB_PATH:$LD_LIBRARY_PATH" >> bin/clp
     123      echo "${SCRIPTPATH}/clp.bin" >> bin/clp
     124      echo "export LD_LIBRARY_PATH=$OLD_LP" >> bin/clp
     125      echo "exit $?" >> bin/clp
     126      chmod a+rx bin/clp
    100127    fi
    101128  - tar -czvf $TGZ_FILE lib/* bin/* include/* share/* README.md LICENSE AUTHORS
Note: See TracChangeset for help on using the changeset viewer.