perf(list): don't hash ignored files

This commit is contained in:
zawz 2022-01-28 11:07:25 +01:00
parent 8865f53ce4
commit 1a87ddfd87

View file

@ -4,7 +4,7 @@
local_hash_list()
{
{ ( set -e
find . -type f ! -regex "^./$syncdir/.*" | sed 's|^./||g' | tr '\n' '\0' | xargs -0 md5sum | cut -c1-33,35- | grep -vE "$ignores"
find . -type f ! -regex "^./$syncdir/.*" | sed 's|^./||g' | grep -vE "$ignores" | tr '\n' '\0' | xargs -0 md5sum | cut -c1-33,35-
find . -type l | sed 's|^./||g' | while read -r ln
do
find "$ln" -maxdepth 0 -printf '%l' | md5sum | sed "s|-|$ln|g"
@ -17,7 +17,7 @@ server_hash_list()
ssh_exec '#LXSH_PARSE_MINIFY
set -e
cd "$1"
find . -type f ! -regex "^./$2/.*" | sed "s|^./||g" | tr "\n" "\0" | xargs -0 md5sum | cut -c1-33,35- | grep -vE "$3"
find . -type f ! -regex "^./$2/.*" | sed "s|^./||g" | grep -vE "$3" | tr "\n" "\0" | xargs -0 md5sum | cut -c1-33,35-
find . -type l | sed "s|^./||g" | while read -r ln
do
find "$ln" -maxdepth 0 -printf "%l" | md5sum | sed "s|-|$ln|g"