aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>2015-02-06 19:11:54 -0100
committerJorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>2015-02-06 19:11:54 -0100
commite0189f9b76508e61844cffa11a2ac89adfae28e5 (patch)
treec9218a700f4c56381c27de0e32636640de97acd7 /scripts
parentSort arches. (diff)
downloadreleng-e0189f9b76508e61844cffa11a2ac89adfae28e5.tar.gz
releng-e0189f9b76508e61844cffa11a2ac89adfae28e5.tar.bz2
releng-e0189f9b76508e61844cffa11a2ac89adfae28e5.zip
Update the script to improve the readbility of the latest-{iso,stage3} for amd64/x86.
Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/copy_buildsync.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/copy_buildsync.sh b/scripts/copy_buildsync.sh
index b0b2b61e..30b25a6e 100755
--- a/scripts/copy_buildsync.sh
+++ b/scripts/copy_buildsync.sh
@@ -69,9 +69,11 @@ for ARCH in $ARCHES; do
if [ -n "${iso_list}" ]; then
echo -e "${header}" >"${OUT_ISO}"
- echo -e "${iso_list}" |awk '{print $3}' | grep "$latest_iso_date" >>${OUT_ISO}
- rm -f current-iso
- ln -sf "$latest_iso_date" current-iso
+ if [[ ! $(echo ${iso_list} | egrep "amd64|x86") ]]; then
+ echo -e "${iso_list}" |awk '{print $3}' | grep "$latest_iso_date" >>${OUT_ISO}
+ rm -f current-iso
+ ln -sf "$latest_iso_date" current-iso
+ fi
fi
if [ -n "${stage3_list}" ]; then
echo -e "${header}" >"${OUT_STAGE3}"
@@ -91,10 +93,12 @@ for ARCH in $ARCHES; do
echo -n '' >"${tmpdir}"/.keep.${ARCH}.txt
for v in $variants ; do
variant_path=$(find 20* -iname "${v}-20*" \( -name '*.tar.bz2' -o -iname '*.iso' \) -print | sed -e "s,.*/$a/autobuilds/,,g" | sort -k1,1 -t/ | tail -n1 )
+ size=$(stat --format=%s ${variant_path})
f="latest-${v}.txt"
echo -e "${header}" >"${f}"
- echo -e "${variant_path}" >>${f}
- echo -e "${variant_path}" >>${OUT_STAGE3}
+ echo -e "${variant_path} ${size}" >>${f}
+ [[ ${variant_path} =~ tar.*$ ]] && echo -e "${variant_path} ${size}" >>${OUT_STAGE3}
+ [[ ${variant_path} =~ iso$ ]] && echo -e "${variant_path} ${size}" >>${OUT_ISO}
rm -f "current-$v"
ln -sf "${variant_path%/*}" "current-$v"
echo "${variant_path}" | sed -e 's,/.*,,g' -e 's,^,/,g' -e 's,$,$,g' >>"${tmpdir}"/.keep.${ARCH}.txt