You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

unix-init-env.sh 929B

3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/bash
  2. # This script performs any environment initialisation needed for the build of OpenViBE.
  3. function usage()
  4. {
  5. echo "usage: ./unix-init-env.sh [options]"
  6. echo ""
  7. echo "-h | --help : usage"
  8. echo "-v | --verbose : verbose output at building step"
  9. echo "--dependencies-dir <dirname> : directory where dependencies are located"
  10. }
  11. # variable inits
  12. dependencies_dir=""
  13. # arg parsing
  14. while [[ $# -gt 0 ]]; do
  15. key="$1"
  16. case $key in
  17. -h | --help)
  18. usage
  19. exit 0
  20. ;;
  21. -v | --verbose)
  22. verbose=1
  23. ;;
  24. --dependencies-dir)
  25. dependencies_dir=$2
  26. shift
  27. ;;
  28. *)
  29. echo "ERROR: Unknown parameter $key"
  30. exit 1
  31. ;;
  32. esac
  33. shift # past argument or value
  34. done
  35. if [ -z "$dependencies_dir" ]
  36. then
  37. echo "Missing --dependencies-dir"
  38. usage
  39. else
  40. echo "unix-init-env: adding dependencies to path"
  41. # Add to the front of PATH any needed dependency.
  42. export PATH=$dependencies_dir/cmake/bin:$PATH
  43. fi