mirror of
https://cgit.krebsco.de/krops
synced 2024-11-23 03:29:48 +01:00
Merge pull request #30 from krebs/fixups
(hopefully) fix pass with subfolders, make README more clear for extraOptions
This commit is contained in:
commit
cccebf3ff7
2 changed files with 8 additions and 4 deletions
|
@ -89,7 +89,7 @@ pkgs.krops.writeDeploy "deploy" {
|
||||||
source = /* ... */;
|
source = /* ... */;
|
||||||
target = lib.mkTarget "user@host/path" // {
|
target = lib.mkTarget "user@host/path" // {
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"-oLogLevel=DEBUG"
|
"-o" "LogLevel=DEBUG"
|
||||||
];
|
];
|
||||||
sudo = true;
|
sudo = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -119,21 +119,25 @@ let
|
||||||
rm -fR "$tmp_dir"
|
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
|
while read -r gpg_path; do
|
||||||
|
|
||||||
rel_name=''${gpg_path#${quote passPrefix}}
|
rel_name=''${gpg_path#${quote passPrefix}}
|
||||||
rel_name=''${rel_name%.gpg}
|
rel_name=''${rel_name%.gpg}
|
||||||
|
|
||||||
pass_date=$(
|
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
|
pass_name=${quote source.name}/$rel_name
|
||||||
tmp_path=$tmp_dir/$rel_name
|
tmp_path=$tmp_dir/$rel_name
|
||||||
|
|
||||||
${coreutils}/bin/mkdir -p "$(${coreutils}/bin/dirname "$tmp_path")"
|
${coreutils}/bin/mkdir -p "$(${coreutils}/bin/dirname "$tmp_path")"
|
||||||
PASSWORD_STORE_DIR=${quote source.dir} ${pass}/bin/pass show "$pass_name" > "$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
|
done
|
||||||
|
|
||||||
if test -n "''${local_pass_info-}"; then
|
if test -n "''${local_pass_info-}"; then
|
||||||
|
|
Loading…
Reference in a new issue