diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2019-05-27 17:48:55 +0200 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2019-05-27 17:48:55 +0200 |
commit | ae30c173eddd217144d6cb1db4c272261c09ba68 (patch) | |
tree | 897fac11b1f54362a564b9b2df778299a6d2c9ae /modules/apps/mysqlbackup.nix | |
parent | f030c9a9d1dad41e84e034ff4b8c6ee75d5bf3fe (diff) | |
download | nixsap-ae30c173eddd217144d6cb1db4c272261c09ba68.tar.gz |
Use mapfile in backup apps
Fix shellcheck warning SC2207:
Prefer mapfile or read -a to split command output (or quote to avoid
splitting).
Diffstat (limited to 'modules/apps/mysqlbackup.nix')
-rw-r--r-- | modules/apps/mysqlbackup.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/apps/mysqlbackup.nix b/modules/apps/mysqlbackup.nix index 8e87da6..96e5f08 100644 --- a/modules/apps/mysqlbackup.nix +++ b/modules/apps/mysqlbackup.nix @@ -182,8 +182,8 @@ let mv "$dump".tmp "$dump" ${optionalString (gpgPubKeys != []) '' - recipient=( $(${gpg} --homedir '${privateDir}/gnupg' -k --with-colons --fast-list-mode | \ - ${pkgs.gawk}/bin/awk -F: '/^pub/{print $5}') ) + mapfile -t recipient < <(${gpg} --homedir '${privateDir}/gnupg' -k --with-colons --fast-list-mode | \ + ${pkgs.gawk}/bin/awk -F: '/^pub/{print $5}') r=( "''${recipient[@]/#/-r}" ) ${gpg} --homedir '${privateDir}/gnupg' --batch --no-tty --yes \ "''${r[@]}" --trust-model always \ |