aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci/setup.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-05-28 02:14:05 -0300
committerEuAndreh <eu@euandre.org>2019-05-28 02:20:00 -0300
commit6b6af477cb7296279d317cf584a0020e0201156d (patch)
treecc016501a7bfd2324e97c4437537eb261a296b2a /scripts/ci/setup.sh
parentRemove git rev-parse from .envrc (diff)
downloadserver-6b6af477cb7296279d317cf584a0020e0201156d.tar.gz
server-6b6af477cb7296279d317cf584a0020e0201156d.tar.xz
Split scripts into CI and VPS box
Diffstat (limited to 'scripts/ci/setup.sh')
-rwxr-xr-xscripts/ci/setup.sh22
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