aboutsummaryrefslogtreecommitdiff
path: root/nixops/scripts/with_env
diff options
context:
space:
mode:
Diffstat (limited to 'nixops/scripts/with_env')
-rwxr-xr-xnixops/scripts/with_env9
1 files changed, 2 insertions, 7 deletions
diff --git a/nixops/scripts/with_env b/nixops/scripts/with_env
index dd0fecb..26e74b5 100755
--- a/nixops/scripts/with_env
+++ b/nixops/scripts/with_env
@@ -5,11 +5,6 @@ if [ -z "$NIXOPS" ]; then
5 exit 1; 5 exit 1;
6fi 6fi
7 7
8if [ -z "$NIXOPS_CONFIG_PASS_SUBTREE_PATH" ]; then
9 echo "Please set NIXOPS_CONFIG_PASS_SUBTREE_PATH to the password-store subtree path"
10 exit 1;
11fi
12
13TEMP=$(mktemp -d /tmp/XXXXXX-nixops-files) 8TEMP=$(mktemp -d /tmp/XXXXXX-nixops-files)
14chmod go-rwx $TEMP 9chmod go-rwx $TEMP
15 10
@@ -21,10 +16,10 @@ finish() {
21trap finish EXIT 16trap finish EXIT
22 17
23# pass cannot "just" list files in a directory without showing a tree :( 18# pass cannot "just" list files in a directory without showing a tree :(
24files=$(pass ls $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/files | sed -e '1d' -e 's/^.* //') 19files=$(pass ls Nixops/files | sed -e '1d' -e 's/^.* //')
25 20
26for file in $files; do 21for file in $files; do
27 pass show "$NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/files/$file" > $TEMP/$file 22 pass show "Nixops/files/$file" > $TEMP/$file
28done 23done
29$NIXOPS set-args --argstr privateFiles "$TEMP" 24$NIXOPS set-args --argstr privateFiles "$TEMP"
30 25