diff options
Diffstat (limited to 'scripts/ci/setup.sh')
-rwxr-xr-x | scripts/ci/setup.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/ci/setup.sh b/scripts/ci/setup.sh new file mode 100755 index 0000000..b6ab06f --- /dev/null +++ b/scripts/ci/setup.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash +# shellcheck shell=bash +set -Eeuo pipefail +cd "$(dirname "${BASH_SOURCE[0]}")" +cd ../../ + +echo "Unlocking git-crypt repos..." +git crypt unlock +# Assumes vps-state was already cloned +pushd ../vps-state/ +git crypt unlock +popd +echo "Done." + +# git smudge after git-crypt clears file permissions +chmod 600 ./secrets/vps_box +chmod 600 ./secrets/borg_remote +cat .envrc >> ~/.buildenv + +source .envrc +envsubst < ./ssh.conf >> ~/.ssh/config |