setup_env.sh 717 B

123456789101112131415161718192021222324252627282930
  1. #
  2. # Copyright (c) 2016-present, Facebook, Inc.
  3. # All rights reserved.
  4. #
  5. # This source code is licensed under the license found in the
  6. # LICENSE-examples file in the root directory of this source tree.
  7. #
  8. VIRTUALENV_PATH=$1
  9. if [ -d "$VIRTUALENV_PATH" ]; then
  10. echo "Virtual Env already installed"
  11. elif [ -z "$VIRTUALENV_PATH" ]; then
  12. echo "Usage: ./setup_env.sh <folder path>"
  13. else
  14. mkdir $VIRTUALENV_PATH
  15. pushd $VIRTUALENV_PATH
  16. curl -L -o virtualenv.pyz https://bootstrap.pypa.io/virtualenv.pyz
  17. popd
  18. python $VIRTUALENV_PATH/virtualenv.pyz $VIRTUALENV_PATH
  19. source $VIRTUALENV_PATH/bin/activate
  20. pip install autobahntestsuite
  21. echo "Environment succesfully set up in $VIRTUALENV_PATH."
  22. fi