Gentoo Archives: gentoo-commits

From: "Jorge Manuel B. S. Vicetto" <jmbsvicetto@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/releng:master commit in: scripts/
Date: Fri, 06 Feb 2015 20:13:24
Message-Id: 1423253514.e0189f9b76508e61844cffa11a2ac89adfae28e5.jmbsvicetto@gentoo
1 commit: e0189f9b76508e61844cffa11a2ac89adfae28e5
2 Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 6 20:11:54 2015 +0000
4 Commit: Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 6 20:11:54 2015 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/releng.git;a=commit;h=e0189f9b
7
8 Update the script to improve the readbility of the latest-{iso,stage3} for amd64/x86.
9
10 Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org>
11
12 ---
13 scripts/copy_buildsync.sh | 14 +++++++++-----
14 1 file changed, 9 insertions(+), 5 deletions(-)
15
16 diff --git a/scripts/copy_buildsync.sh b/scripts/copy_buildsync.sh
17 index b0b2b61..30b25a6 100755
18 --- a/scripts/copy_buildsync.sh
19 +++ b/scripts/copy_buildsync.sh
20 @@ -69,9 +69,11 @@ for ARCH in $ARCHES; do
21
22 if [ -n "${iso_list}" ]; then
23 echo -e "${header}" >"${OUT_ISO}"
24 - echo -e "${iso_list}" |awk '{print $3}' | grep "$latest_iso_date" >>${OUT_ISO}
25 - rm -f current-iso
26 - ln -sf "$latest_iso_date" current-iso
27 + if [[ ! $(echo ${iso_list} | egrep "amd64|x86") ]]; then
28 + echo -e "${iso_list}" |awk '{print $3}' | grep "$latest_iso_date" >>${OUT_ISO}
29 + rm -f current-iso
30 + ln -sf "$latest_iso_date" current-iso
31 + fi
32 fi
33 if [ -n "${stage3_list}" ]; then
34 echo -e "${header}" >"${OUT_STAGE3}"
35 @@ -91,10 +93,12 @@ for ARCH in $ARCHES; do
36 echo -n '' >"${tmpdir}"/.keep.${ARCH}.txt
37 for v in $variants ; do
38 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 )
39 + size=$(stat --format=%s ${variant_path})
40 f="latest-${v}.txt"
41 echo -e "${header}" >"${f}"
42 - echo -e "${variant_path}" >>${f}
43 - echo -e "${variant_path}" >>${OUT_STAGE3}
44 + echo -e "${variant_path} ${size}" >>${f}
45 + [[ ${variant_path} =~ tar.*$ ]] && echo -e "${variant_path} ${size}" >>${OUT_STAGE3}
46 + [[ ${variant_path} =~ iso$ ]] && echo -e "${variant_path} ${size}" >>${OUT_ISO}
47 rm -f "current-$v"
48 ln -sf "${variant_path%/*}" "current-$v"
49 echo "${variant_path}" | sed -e 's,/.*,,g' -e 's,^,/,g' -e 's,$,$,g' >>"${tmpdir}"/.keep.${ARCH}.txt