aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-05-26 20:14:36 -0300
committerEuAndreh <eu@euandre.org>2019-05-26 20:15:41 -0300
commitbd6485443aee46ecd0bd5356ab7d35fdf761545d (patch)
treeba7fc09634cb015c6a7702c281bfd16a89f10d63
parentRun CI scripts from ./vps/ folder (diff)
downloadtoph-bd6485443aee46ecd0bd5356ab7d35fdf761545d.tar.gz
toph-bd6485443aee46ecd0bd5356ab7d35fdf761545d.tar.xz
Use more robust Bash cd approach
-rwxr-xr-xci-setup.sh2
-rwxr-xr-xdeploy.sh2
-rw-r--r--provision.sh2
-rw-r--r--secrets/envrc.shbin433 -> 445 bytes
4 files changed, 3 insertions, 3 deletions
diff --git a/ci-setup.sh b/ci-setup.sh
index 3a84639..affa75d 100755
--- a/ci-setup.sh
+++ b/ci-setup.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash
set -Eeuo pipefail
-cd "${BASH_SOURCE%/*}/"
+cd "$(dirname "${BASH_SOURCE[0]}")"
echo "Unlocking git-crypt repos..."
git crypt unlock
diff --git a/deploy.sh b/deploy.sh
index 036fd6e..9529bf9 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -Eeuo pipefail
-cd "${BASH_SOURCE%/*}/"
+cd "$(dirname "${BASH_SOURCE[0]}")"
apt_wait() {
local i=0
diff --git a/provision.sh b/provision.sh
index b472c51..9132068 100644
--- a/provision.sh
+++ b/provision.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash
set -Eeuo pipefail
-cd "${BASH_SOURCE%/*}/"
+cd "$(dirname "${BASH_SOURCE[0]}")"
echo "Shutting down running containers..."
ssh "cd /home/vps/ && docker-compose down"
diff --git a/secrets/envrc.sh b/secrets/envrc.sh
index b565060..a00bf29 100644
--- a/secrets/envrc.sh
+++ b/secrets/envrc.sh
Binary files differ