depot/hack/populate_secrets.sh

16 lines
494 B
Bash
Raw Normal View History

2020-05-10 01:32:05 +00:00
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0
set -eu
echo Dropping files into place as defined by manifest...
while read -r manifest_line; do
manifest_key="$(echo "$manifest_line" | cut -d'=' -f1)"
manifest_value="$(echo "$manifest_line" | cut -d'=' -f2)"
printf "\t%s\n" "${manifest_key}"
manifest_key_val="${!manifest_key}"
cp "${manifest_key_val}" "${manifest_value}"
done < "$SECRETS_MANIFEST"