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