Congbin Guo | e84118c | 2018-03-30 18:38:58 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Copyright 2018 The Chromium OS 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 | |
Congbin Guo | ce3778a | 2018-05-11 14:56:37 -0700 | [diff] [blame] | 6 | # Run Google Storage archive server from inside virtual environment. |
Congbin Guo | e84118c | 2018-03-30 18:38:58 -0700 | [diff] [blame] | 7 | set -eu |
Congbin Guo | ce3778a | 2018-05-11 14:56:37 -0700 | [diff] [blame] | 8 | readonly bindir=$(dirname -- "$(readlink -e -- "$0")") |
Sanika Kulkarni | 154e9af | 2020-06-29 17:05:50 -0700 | [diff] [blame] | 9 | readonly homedir=$(cd "${bindir}"/../gs_cache; pwd) |
| 10 | readonly nebraska_dir=$(cd "${bindir}"/../nebraska; pwd) |
| 11 | export PYTHONPATH=${homedir}:${nebraska_dir} |
Congbin Guo | e84118c | 2018-03-30 18:38:58 -0700 | [diff] [blame] | 12 | |
Sanika Kulkarni | 154e9af | 2020-06-29 17:05:50 -0700 | [diff] [blame] | 13 | exec vpython -vpython-spec "${homedir}"/.vpython -m gs_archive_server "$@" |