Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ |
---|
4 | set -euxo pipefail |
---|
5 | |
---|
6 | # The filesystem location of the wheelhouse which we'll populate with wheels |
---|
7 | # for all of our dependencies. |
---|
8 | WHEELHOUSE_PATH="$1" |
---|
9 | shift |
---|
10 | |
---|
11 | # The filesystem location of the root of a virtualenv we can use to get/build |
---|
12 | # wheels. |
---|
13 | BOOTSTRAP_VENV="$1" |
---|
14 | shift |
---|
15 | |
---|
16 | # The filesystem location of the root of the project source. We need this to |
---|
17 | # know what wheels to get/build, of course. |
---|
18 | PROJECT_ROOT="$1" |
---|
19 | shift |
---|
20 | |
---|
21 | # Most stuff is going to run as nobody. Here's a helper to make sure nobody |
---|
22 | # can access necessary files. |
---|
23 | CHOWN_NOBODY="chown --recursive nobody:$(id --group nobody)" |
---|
24 | |
---|
25 | # Avoid the /nonexistent home directory in nobody's /etc/passwd entry. |
---|
26 | usermod --home /tmp/nobody nobody |
---|
27 | |
---|
28 | # Grant read access to nobody, the user which will eventually try to test this |
---|
29 | # checkout. |
---|
30 | ${CHOWN_NOBODY} "${PROJECT_ROOT}" |
---|
31 | |
---|
32 | # Create a place for some wheels to live. |
---|
33 | mkdir -p "${WHEELHOUSE_PATH}" |
---|
34 | ${CHOWN_NOBODY} "${WHEELHOUSE_PATH}" |
---|
Note: See
TracBrowser
for help on using the repository browser.