hack/populate_secrets: make POSIX-compliant?
This commit is contained in:
parent
6f33f49b9c
commit
5f1f8bd386
1 changed files with 7 additions and 7 deletions
|
@ -1,12 +1,12 @@
|
||||||
#!/usr/bin/env nix-shell
|
#!/bin/sh
|
||||||
#!nix-shell -i bash
|
|
||||||
|
|
||||||
set -euo pipefail
|
set -eu
|
||||||
|
|
||||||
echo Dropping files into place as defined by manifest...
|
echo Dropping files into place as defined by manifest...
|
||||||
while read -r manifest_line; do
|
while read -r manifest_line; do
|
||||||
IFS='=' read -ra manifest_bits <<< "$manifest_line"
|
manifest_key="$(echo "$manifest_line" | cut -f'=' -f1)"
|
||||||
if [[ "${#manifest_bits[@]}" -ne 2 ]]; then continue; fi
|
manifest_value="$(echo "$manifest_line" | cut -f'=' -f2)"
|
||||||
echo -e "\t${manifest_bits[1]}"
|
printf "\t%s\n" "${manifest_key}"
|
||||||
cp "${!manifest_bits[0]}" "${manifest_bits[1]}"
|
eval manifest_key_val=\"\$$manifest_key\"
|
||||||
|
cp "${manifest_key_val}" "${manifest_value}"
|
||||||
done < "$SECRETS_MANIFEST"
|
done < "$SECRETS_MANIFEST"
|
||||||
|
|
Loading…
Reference in a new issue