From 6b6af477cb7296279d317cf584a0020e0201156d Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Tue, 28 May 2019 02:14:05 -0300 Subject: Split scripts into CI and VPS box --- scripts/ci/setup.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 scripts/ci/setup.sh (limited to 'scripts/ci/setup.sh') 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 -- cgit v1.2.3