Framework for building UIs for OpenStack projects dealing with complex input data
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.

nodeenv.sh 359B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. set -e
  3. # This script checks if node is installed in the current path,
  4. # and if not, will install the version specified. using nodeenv -p
  5. #
  6. #command -v node && echo "ok"
  7. ENVDIR="$1"
  8. VERSION="$2"
  9. if [[ $(command -v node) ]]
  10. then
  11. exit
  12. fi
  13. if [[ -n "$VERSION" ]]
  14. then
  15. nodeenv -p "$ENVDIR" --node="$VERSION"
  16. else
  17. nodeenv -p "$ENVDIR"
  18. fi