From da28a4e2afef21710f73860b26893fa18dd32858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 29 Aug 2020 18:37:54 +0200 Subject: Add environment file instead of hardcoding everything in makefiles --- nixops/scripts/with_env | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nixops/scripts') diff --git a/nixops/scripts/with_env b/nixops/scripts/with_env index 26e74b5..9882f78 100755 --- a/nixops/scripts/with_env +++ b/nixops/scripts/with_env @@ -1,7 +1,7 @@ #!/usr/bin/env bash -if [ -z "$NIXOPS" ]; then - echo "Please set NIXOPS to the nixops command" +if [ -z "$NIXOPS_ENV_LOADED" ]; then + echo "Please load the environment with direnv" exit 1; fi @@ -10,7 +10,7 @@ chmod go-rwx $TEMP finish() { rm -rf "$TEMP" - $NIXOPS set-args --unset privateFiles + nixops set-args --unset privateFiles } trap finish EXIT @@ -21,6 +21,6 @@ files=$(pass ls Nixops/files | sed -e '1d' -e 's/^.* //') for file in $files; do pass show "Nixops/files/$file" > $TEMP/$file done -$NIXOPS set-args --argstr privateFiles "$TEMP" +nixops set-args --argstr privateFiles "$TEMP" "$@" -- cgit v1.2.3