Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/bootstrap_secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SECRETS_DIR="$(cd "${SCRIPT_DIR}/../secrets" && pwd)"

randstr() { LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | head -c "$1"; }
# `head` closes the pipe once it has enough bytes, so `tr` dies with SIGPIPE
# (141). Under `set -o pipefail` that would abort the script, so tolerate it.
randstr() { LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | head -c "$1" || true; }

# Extract a KEY=value from a file, or empty string if absent.
readval() {
Expand Down
Loading