diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2023-10-08 17:08:03 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2023-10-08 17:08:03 -0700 |
commit | c5b7bfb6ecb63958ae99ed64144f0a508010b645 (patch) | |
tree | ffb0e0b023595a784ed464fe4c877d5e23cc7625 /scripts | |
parent | copy_buildsync: fix double ln (diff) | |
download | releng-c5b7bfb6ecb63958ae99ed64144f0a508010b645.tar.gz releng-c5b7bfb6ecb63958ae99ed64144f0a508010b645.tar.bz2 releng-c5b7bfb6ecb63958ae99ed64144f0a508010b645.zip |
copy_buildsync: refactor check for link create
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/copy_buildsync.sh | 4 |
1 files 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 |