vpython 1000 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/env bash
  2. # Copyright 2018 The Chromium Authors. All rights reserved.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. if [[ $VPYTHON_BYPASS == "manually managed python not supported by chrome operations" ]]
  6. then
  7. NEWARGS=()
  8. while [[ $# -gt 0 ]]
  9. do
  10. case "$1" in
  11. -vpython-tool*) # these tools all do something vpython related and quit
  12. exit 0
  13. ;;
  14. -vpython*=*) # delete any vpython-specific flag (w/ attached argument)
  15. shift
  16. ;;
  17. -vpython*) # delete any vpython-specific flag (w/ separate argument)
  18. shift
  19. shift
  20. ;;
  21. --) # stop parsing
  22. NEWARGS+=( "$@" )
  23. break
  24. ;;
  25. *) # regular arg
  26. NEWARGS+=( "$1" )
  27. shift
  28. ;;
  29. esac
  30. done
  31. exec "python" "${NEWARGS[@]}"
  32. fi
  33. base_dir=$(dirname "$0")
  34. source "$base_dir/cipd_bin_setup.sh"
  35. cipd_bin_setup &> /dev/null
  36. exec "$base_dir/.cipd_bin/vpython" "$@"