diff options
author | Ben Kohler <bkohler@gentoo.org> | 2019-01-09 11:18:48 -0600 |
---|---|---|
committer | Ben Kohler <bkohler@gentoo.org> | 2019-01-09 11:18:48 -0600 |
commit | d8a805cba3ea8cc800fdc0e6e9a4972f933701c2 (patch) | |
tree | 152ff6b4576bf2a71c2f8b0c7207896875302b07 /tools/catalyst-auto-sparc64.conf | |
parent | installcd-stage2-minimal.spec: cdtar must be bz2 (diff) | |
download | releng-d8a805cba3ea8cc800fdc0e6e9a4972f933701c2.tar.gz releng-d8a805cba3ea8cc800fdc0e6e9a4972f933701c2.tar.bz2 releng-d8a805cba3ea8cc800fdc0e6e9a4972f933701c2.zip |
lyst-auto-sparc64.conf: borrow new symlink logic from amd64
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
Diffstat (limited to 'tools/catalyst-auto-sparc64.conf')
-rw-r--r-- | tools/catalyst-auto-sparc64.conf | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/tools/catalyst-auto-sparc64.conf b/tools/catalyst-auto-sparc64.conf index 5f37ecd2..f6357a35 100644 --- a/tools/catalyst-auto-sparc64.conf +++ b/tools/catalyst-auto-sparc64.conf @@ -23,27 +23,34 @@ KCONFIG_DIR=${REPO_DIR}/releases/weekly/kconfig/sparc EXTENSIONS="[.tar.xz,.tar.bz2,.tar.gz,.tar,.sfs]" give_latest_from_dates() { - sed 's,-20,~20,g' | \ - sort -k +1 -n -t '~' |\ - awk -F\~ \ - 'BEGIN{i=$1; o=$0}; - { if($1 != i && i != "") { print o; }; i=$1; o=$0; } - END { print o; };' | \ - tr '~' '-' + sed 's,-20,~20,g' | \ + sort -k +1 -n -t '~' | \ + awk -F\~ \ + 'BEGIN{i=$1; o=$0}; + { if($1 != i && i != "") { print o; }; i=$1; o=$0; } + END { print o; };' | \ + tr '~' '-' } - update_symlinks() { - # Symlink the latest stages3 to build from - for d in ${BUILD_SRCDIR_BASE}/default; do - pushd $d >/dev/null - for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do - of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff - of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $ - ln -sf $f $of - done - popd >/dev/null - done + # Symlink the latest stages3 to build from + for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do + pushd $d >/dev/null + for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do + # 20yymmddThhmmssZ + # 20yymmddhhmmss + # 20yymmdd + # 20yy.n + of=$(perl -p \ + -e 's/20\d{6}T\d{6}Z/latest/g;' \ + -e 's/20\d{6}\d{6}/latest/g;' \ + -e 's/20\d{6}/latest/g;' \ + -e 's/20\d{2}\.\d{2}/latest/g;' \ + <<<"$f") + ln -svf "$f" "$of" + done + popd >/dev/null + done } upload() { |