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:
parent
3ebbfc6261
commit
59aa5d0e41
1 changed files with 9 additions and 1 deletions
|
@ -119,7 +119,15 @@ let
|
||||||
umask 0077
|
umask 0077
|
||||||
|
|
||||||
if test -e ${quote source.dir}/.git; then
|
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 */ ''
|
remote_pass_info=$(${runShell target /* sh */ ''
|
||||||
cat ${quote target.path}/.pass_info || :
|
cat ${quote target.path}/.pass_info || :
|
||||||
''})
|
''})
|
||||||
|
|
Loading…
Reference in a new issue