diff --git a/.gitignore b/.gitignore index 2e0405346d..3e06bcb8ff 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.pyc # ignore cipd client files +/.cipd_bin /.cipd_client* /.versions @@ -67,3 +68,6 @@ # Ignore google AE downloaded for running testing only. testing_support/google_appengine + +# Ignore emacs / vim backup files. +*~ diff --git a/cipd_bin_setup.sh b/cipd_bin_setup.sh new file mode 100644 index 0000000000..61dfb7af64 --- /dev/null +++ b/cipd_bin_setup.sh @@ -0,0 +1,10 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +function cipd_bin_setup { + local MYPATH=$(dirname "${BASH_SOURCE[0]}") + + "$MYPATH/cipd" ensure -ensure-file "$MYPATH/cipd_manifest.txt" \ + -root "$MYPATH/.cipd_bin" +} diff --git a/cipd_manifest.txt b/cipd_manifest.txt new file mode 100644 index 0000000000..692ba02bd5 --- /dev/null +++ b/cipd_manifest.txt @@ -0,0 +1,6 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# vpython. +infra/tools/luci/vpython/${platform} git_revision:589bb41ab0ab9134d2555d7d3051d678d37b3238 diff --git a/vpython b/vpython new file mode 100755 index 0000000000..674a68be84 --- /dev/null +++ b/vpython @@ -0,0 +1,12 @@ +#/bin/bash + +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +MYPATH=$(dirname "${BASH_SOURCE[0]}") + +source "$MYPATH/cipd_bin_setup.sh" +cipd_bin_setup + +exec "$MYPATH/.cipd_bin/vpython" "$@"