commit:     7c16ed27d6de4c92dd6c172e00997f5e0a17ccb7
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 20 22:12:57 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Mar 20 22:12:57 2016 +0000
URL:        https://gitweb.gentoo.org/proj/releng.git/commit/?id=7c16ed27

copy_buildsync.sh: simplify the latest-stage3 symlink checks

The current code is a bit overwrought when it's a simple string compare.

 scripts/copy_buildsync.sh | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/scripts/copy_buildsync.sh b/scripts/copy_buildsync.sh
index b4351cb..4d9f0b1 100755
--- a/scripts/copy_buildsync.sh
+++ b/scripts/copy_buildsync.sh
@@ -123,14 +123,17 @@ process_arch() {
 
                # In the new variant preserve code there is a better way to do 
this
                #echo -e "${stage3_list}" |awk '{print $3}' |grep 
"$latest_stage3_date" >>${OUT_STAGE3}
-               rm -f current-stage3
 
-               # The "latest stage3" concept doesn't apply to the 
arm/hppa/s390/sh variants
-               # that are pushed on different days of the week.
-               # Disable it for amd64/x86 as well as any failures cause 
confusion to users
-               if [[ ! $(echo ${outdir} | egrep 
'amd64|arm|hppa|ppc|s390|sh|x86') ]]; then
-                       ln -sf "$latest_stage3_date" current-stage3
-               fi
+               # The "latest stage3" concept works for only a few arches -- 
ones that
+               # do not have more than one stage3 target per arch (i.e. 
multilib, etc...).
+               case ${ARCH} in
+               amd64|arm|hppa|ppc|s390|sh|x86)
+                       rm -f current-stage3
+                       ;;
+               *)
+                       ln -sfT "$latest_stage3_date" current-stage3
+                       ;;
+               esac
        fi
 
        # New variant preserve code

Reply via email to