Browse Source

Merge pull request #30 from krebs/fixups

(hopefully) fix pass with subfolders, make README more clear for extraOptions
master v1.25.0
Lassulus 6 months ago
committed by GitHub
parent
commit
cccebf3ff7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      README.md
  2. 10
      pkgs/populate/default.nix

2
README.md

@ -89,7 +89,7 @@ pkgs.krops.writeDeploy "deploy" {
source = /* ... */;
target = lib.mkTarget "user@host/path" // {
extraOptions = [
"-oLogLevel=DEBUG"
"-o" "LogLevel=DEBUG"
];
sudo = true;
};

10
pkgs/populate/default.nix

@ -119,21 +119,25 @@ let
rm -fR "$tmp_dir"
}
${findutils}/bin/find ${quote passPrefix} -type f -follow |
${findutils}/bin/find ${quote passPrefix} -type f -follow ! -name .gpg-id |
while read -r gpg_path; do
rel_name=''${gpg_path#${quote passPrefix}}
rel_name=''${rel_name%.gpg}
pass_date=$(
${git}/bin/git -C ${quote source.dir} log -1 --format=%aI "$gpg_path"
if test -e ${quote source.dir}/.git; then
${git}/bin/git -C ${quote source.dir} log -1 --format=%aI "$gpg_path"
fi
)
pass_name=${quote source.name}/$rel_name
tmp_path=$tmp_dir/$rel_name
${coreutils}/bin/mkdir -p "$(${coreutils}/bin/dirname "$tmp_path")"
PASSWORD_STORE_DIR=${quote source.dir} ${pass}/bin/pass show "$pass_name" > "$tmp_path"
${coreutils}/bin/touch -d "$pass_date" "$tmp_path"
if [ -n "$pass_date" ]; then
${coreutils}/bin/touch -d "$pass_date" "$tmp_path"
fi
done
if test -n "''${local_pass_info-}"; then

Loading…
Cancel
Save