Merge pull request #30 from krebs/fixups

(hopefully) fix pass with subfolders, make README more clear for extraOptions
This commit is contained in:
Lassulus 2021-03-23 22:47:37 +01:00 committed by GitHub
commit cccebf3ff7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

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

View File

@ -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=$(
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"
if [ -n "$pass_date" ]; then
${coreutils}/bin/touch -d "$pass_date" "$tmp_path"
fi
done
if test -n "''${local_pass_info-}"; then