mirror of
https://github.com/ryantm/agenix.git
synced 2024-11-22 17:50:48 +03:00
Make 'diff' an explicit dependency
This commit is contained in:
parent
85da8b7366
commit
5c1fbaabc2
1 changed files with 3 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
||||||
gnused,
|
gnused,
|
||||||
nix,
|
nix,
|
||||||
mktemp,
|
mktemp,
|
||||||
|
diffutils,
|
||||||
} :
|
} :
|
||||||
let
|
let
|
||||||
# we need at least rage 0.5.0 to support ssh keys
|
# we need at least rage 0.5.0 to support ssh keys
|
||||||
|
@ -17,6 +18,7 @@ let
|
||||||
sedBin = "${gnused}/bin/sed";
|
sedBin = "${gnused}/bin/sed";
|
||||||
nixInstantiate = "${nix}/bin/nix-instantiate";
|
nixInstantiate = "${nix}/bin/nix-instantiate";
|
||||||
mktempBin = "${mktemp}/bin/mktemp";
|
mktempBin = "${mktemp}/bin/mktemp";
|
||||||
|
diffBin = "${diffutils}/bin/diff";
|
||||||
in
|
in
|
||||||
lib.recursiveUpdate (writeShellScriptBin "agenix" ''
|
lib.recursiveUpdate (writeShellScriptBin "agenix" ''
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
@ -147,7 +149,7 @@ function edit {
|
||||||
echo "$FILE wasn't created."
|
echo "$FILE wasn't created."
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
[ -f "$FILE" ] && [ "$EDITOR" != ":" ] && diff "$CLEARTEXT_FILE.before" "$CLEARTEXT_FILE" 1>/dev/null && echo "$FILE wasn't changed, skipping re-encryption." && return
|
[ -f "$FILE" ] && [ "$EDITOR" != ":" ] && ${diffBin} "$CLEARTEXT_FILE.before" "$CLEARTEXT_FILE" 1>/dev/null && echo "$FILE wasn't changed, skipping re-encryption." && return
|
||||||
|
|
||||||
ENCRYPT=()
|
ENCRYPT=()
|
||||||
while IFS= read -r key
|
while IFS= read -r key
|
||||||
|
|
Loading…
Reference in a new issue