compressonatorcli 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash
  2. # ----------------------------------------------------------------------------------------------------------------------------------
  3. # This script launches the compressonatorcli executable after configuring the environment.
  4. # (c) 2017 Advanced Micro Devices Inc. All Rights Reserved.
  5. # ----------------------------------------------------------------------------------------------------------------------------------
  6. if echo "$0" | grep '^/' ; then
  7. thisScriptFullPath="$0"
  8. else
  9. thisScriptFullPath=`pwd`/$0
  10. fi
  11. # Enable the use of symbolic links to the script
  12. if [ -h ${thisScriptFullPath} ]
  13. then
  14. LINKTARGET=`readlink -f "$thisScriptFullPath"`
  15. thisScriptFullPath=${LINKTARGET}
  16. fi
  17. CMPCLI_BIN_PATH=`dirname "$thisScriptFullPath"`
  18. # Add compressonatorcli's binaries directory to PATH:
  19. export PATH="${CMPCLI_BIN_PATH}:$PATH"
  20. # Add compressonatorcli's binaries directory to LD_LIBRARY_PATH:
  21. if [ -z "$LD_LIBRARY_PATH" ]; then
  22. export LD_LIBRARY_PATH="${CMPCLI_BIN_PATH}"
  23. else
  24. export LD_LIBRARY_PATH="${CMPCLI_BIN_PATH}:$LD_LIBRARY_PATH"
  25. fi
  26. # Add Qt lib directory to LD_LIBRARY_PATH:
  27. export LD_LIBRARY_PATH="${CMPCLI_BIN_PATH}/qt:$LD_LIBRARY_PATH"
  28. # Add pkg libs directory to LD_LIBRARY_PATH:
  29. export LD_LIBRARY_PATH="${CMPCLI_BIN_PATH}/pkglibs:$LD_LIBRARY_PATH"
  30. # Call compressonatorcli executable
  31. if [ -e $CMPCLI_BIN_PATH/compressonatorcli-bin ]; then
  32. $CMPCLI_BIN_PATH/compressonatorcli-bin "$@"
  33. else
  34. echo "Error:Cannot find compressonatorcli-bin"
  35. fi