commit: c5b7bfb6ecb63958ae99ed64144f0a508010b645
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 9 00:08:03 2023 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Oct 9 00:08:03 2023 +0000
URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=c5b7bfb6
copy_buildsync: refactor check for link create
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
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