1
0
Fork 0
mirror of https://cgit.krebsco.de/krops synced 2024-11-26 21:19:47 +01:00

populate pass: make git optional again

This commit is contained in:
lassulus 2021-01-17 16:19:41 +01:00
parent c2fa48550f
commit 9eb2c2d0d6

View file

@ -126,14 +126,18 @@ let
rel_name=''${rel_name%.gpg} rel_name=''${rel_name%.gpg}
pass_date=$( pass_date=$(
if test -e ${quote source.dir}/.git; then
${git}/bin/git -C ${quote source.dir} log -1 --format=%aI "$gpg_path" ${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"
if [ -n "$pass_date" ]; then
${coreutils}/bin/touch -d "$pass_date" "$tmp_path" ${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