From c5b7bfb6ecb63958ae99ed64144f0a508010b645 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sun, 8 Oct 2023 17:08:03 -0700 Subject: [PATCH] copy_buildsync: refactor check for link create Signed-off-by: Robin H. Johnson --- scripts/copy_buildsync.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/copy_buildsync.sh b/scripts/copy_buildsync.sh index 95e3215a..df971e0a 100755 --- a/scripts/copy_buildsync.sh +++ b/scripts/copy_buildsync.sh @@ -232,15 +232,15 @@ process_arch() { cd "current-$v" for variant_file in "../${variant_path}"* ; do doit=0 + vfb=$(basename "$variant_file") # If it doesn't exist, add it. - if [[ ! -e "$variant_file" ]]; then + if [[ ! -e "$vfb" ]]; then doit=1 else # If it does exist, check carefully to see if anything is different # Does it point to somewhere else? # Is the target newer? # If those are true, also bump the symlink. - vfb=$(basename "$variant_file") vft=$(readlink -f "$vfb") [[ "$vft" != "$(readlink -f "$variant_file")" ]] && doit=1 [[ "$vfb" -nt "$vft" ]] && doit=1