From ffa42e7a104454b10466badcbc0539fcfdfc27b4 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 20 Mar 2016 18:29:45 -0400 Subject: [PATCH] copy_buildsync.sh: simplify the latest-iso symlink checks --- scripts/copy_buildsync.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/copy_buildsync.sh b/scripts/copy_buildsync.sh index 4d9f0b1b..1d459216 100755 --- a/scripts/copy_buildsync.sh +++ b/scripts/copy_buildsync.sh @@ -112,11 +112,18 @@ process_arch() { if [ -n "${iso_list}" ]; then echo -e "${header}" >"${OUT_ISO}" - if [[ ! $(echo ${iso_list} | egrep "amd64|x86") ]]; then - echo -e "${iso_list}" |awk '{print $3}' | grep "$latest_iso_date" >>${OUT_ISO} + # Some arches produce more than one type of iso. + # Only apply the current-iso link logic to them. + # TODO: Should make this dynamic based on the iso list. + case ${ARCH} in + amd64|x86) rm -f current-iso - ln -sf "$latest_iso_date" current-iso - fi + ;; + *) + echo -e "${iso_list}" |awk '{print $3}' | grep "$latest_iso_date" >>${OUT_ISO} + ln -sfT "$latest_iso_date" current-iso + ;; + esac fi if [ -n "${stage3_list}" ]; then echo -e "${header}" >"${OUT_STAGE3}"