forked from google/grr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_grr_from_gcs.sh
executable file
·37 lines (31 loc) · 1.07 KB
/
install_grr_from_gcs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
#
# This script downloads the most recent sdists for GRR and installs
# them in a Docker image.
set -e
INITIAL_DIR="${PWD}"
WORK_DIR=/tmp/docker_work_dir
pyscript="
import ConfigParser
config = ConfigParser.SafeConfigParser()
config.read('version.ini')
print('%s.%s.%s-%s' % (
config.get('Version', 'major'),
config.get('Version', 'minor'),
config.get('Version', 'revision'),
config.get('Version', 'release')))
"
readonly DEB_VERSION="$(python -c "${pyscript}")"
wget --quiet "https://storage.googleapis.com/autobuilds.grr-response.com/_latest_server_deb/grr-server_${DEB_VERSION}.tar.gz"
tar xzf grr-server_*.tar.gz
$GRR_VENV/bin/pip install --no-index --no-cache-dir \
--find-links=grr/local_pypi \
grr/local_pypi/grr-response-proto-*.zip \
grr/local_pypi/grr-response-core-*.zip \
grr/local_pypi/grr-response-client-*.zip \
grr/local_pypi/grr-api-client-*.zip \
grr/local_pypi/grr-response-server-*.zip \
grr/local_pypi/grr-response-test-*.zip \
grr/local_pypi/grr-response-templates-*.zip
cd "${INITIAL_DIR}"
rm -rf "${WORK_DIR}"