source: trunk/.circleci/fix-permissions.sh

Last change on this file was 2f8e22f, checked in by Jean-Paul Calderone <exarkun@…>, at 2019-04-06T14:00:19Z

Fix the permissions ... twice. Thanks, COPY.

  • Property mode set to 100755
File size: 1012 bytes
Line 
1#!/bin/bash
2
3# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
4set -euxo pipefail
5
6# The filesystem location of the wheelhouse which we'll populate with wheels
7# for all of our dependencies.
8WHEELHOUSE_PATH="$1"
9shift
10
11# The filesystem location of the root of a virtualenv we can use to get/build
12# wheels.
13BOOTSTRAP_VENV="$1"
14shift
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.
18PROJECT_ROOT="$1"
19shift
20
21# Most stuff is going to run as nobody.  Here's a helper to make sure nobody
22# can access necessary files.
23CHOWN_NOBODY="chown --recursive nobody:$(id --group nobody)"
24
25# Avoid the /nonexistent home directory in nobody's /etc/passwd entry.
26usermod --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.
33mkdir -p "${WHEELHOUSE_PATH}"
34${CHOWN_NOBODY} "${WHEELHOUSE_PATH}"
Note: See TracBrowser for help on using the repository browser.