1
0
Fork 0
mirror of https://cgit.krebsco.de/krops synced 2024-11-23 03:29:48 +01:00

populate pass: calculate hash for each symlink

this fixes folders with symlinks not getting updated if the symlinked
file is in another subfolder of the pass repo
This commit is contained in:
lassulus 2023-03-13 07:13:59 +01:00
parent 3ebbfc6261
commit 59aa5d0e41

View file

@ -119,7 +119,15 @@ let
umask 0077
if test -e ${quote source.dir}/.git; then
local_pass_info=${quote source.name}\ $(${git}/bin/git -C ${quote source.dir} log -1 --format=%H ${quote source.name})
local_pass_info=${quote source.name}\ $(
${git}/bin/git -C ${quote source.dir} log -1 --format=%H ${quote source.name}
# we append a hash for every symlink, otherwise we would miss updates on
# files where the symlink points to
${findutils}/bin/find ${quote source.dir}/${quote source.name} -type l \
-exec ${coreutils}/bin/realpath {} + |
${coreutils}/bin/sort |
${findutils}/bin/xargs -r -n 1 ${git}/bin/git -C ${quote source.dir} log -1 --format=%H
)
remote_pass_info=$(${runShell target /* sh */ ''
cat ${quote target.path}/.pass_info || :
''})