From 546c62b2c73fbc45bd883ede39230b5a23b47bfe Mon Sep 17 00:00:00 2001 From: thomas Date: Fri, 2 Oct 2026 07:18:44 +0200 Subject: [PATCH] manage symlink --- burpcheck.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/burpcheck.sh b/burpcheck.sh index a269caf..31fd290 100644 --- a/burpcheck.sh +++ b/burpcheck.sh @@ -37,13 +37,14 @@ function _cacheStale { function _getRandomFile { f=$(_getRandomBurpFolders ) #f=/home/tom/Documents/Opendoor/Developpement/Scripts/Backups/BurpCheck/Test + test -L "${f}" && f=$(readlink -f "${f}") test -d "${f}" || { echo "error opening $f" ; exit 1 ; } cacheFile=/tmp/burp_cache_$(echo $f | md5sum | cut -f1 -d ' ') if ( $(_cacheStale "$cacheFile" )) ; then readarray -d '' files < <(shuf -z $cacheFile) - else - readarray -d '' files < <(find $f -type f -print0 | shuf -z | tee $cacheFile) - fi + else + readarray -d '' files < <(find ${f} -type f -print0 | shuf -z | tee $cacheFile) + fi }