lyst-auto-sparc64.conf: borrow new symlink logic from amd64
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
This commit is contained in:
parent
daa362cb19
commit
d8a805cba3
1 changed files with 25 additions and 18 deletions
|
@ -23,27 +23,34 @@ KCONFIG_DIR=${REPO_DIR}/releases/weekly/kconfig/sparc
|
||||||
EXTENSIONS="[.tar.xz,.tar.bz2,.tar.gz,.tar,.sfs]"
|
EXTENSIONS="[.tar.xz,.tar.bz2,.tar.gz,.tar,.sfs]"
|
||||||
|
|
||||||
give_latest_from_dates() {
|
give_latest_from_dates() {
|
||||||
sed 's,-20,~20,g' | \
|
sed 's,-20,~20,g' | \
|
||||||
sort -k +1 -n -t '~' |\
|
sort -k +1 -n -t '~' | \
|
||||||
awk -F\~ \
|
awk -F\~ \
|
||||||
'BEGIN{i=$1; o=$0};
|
'BEGIN{i=$1; o=$0};
|
||||||
{ if($1 != i && i != "") { print o; }; i=$1; o=$0; }
|
{ if($1 != i && i != "") { print o; }; i=$1; o=$0; }
|
||||||
END { print o; };' | \
|
END { print o; };' | \
|
||||||
tr '~' '-'
|
tr '~' '-'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
update_symlinks() {
|
update_symlinks() {
|
||||||
# Symlink the latest stages3 to build from
|
# Symlink the latest stages3 to build from
|
||||||
for d in ${BUILD_SRCDIR_BASE}/default; do
|
for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do
|
||||||
pushd $d >/dev/null
|
pushd $d >/dev/null
|
||||||
for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do
|
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
|
# 20yymmddThhmmssZ
|
||||||
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
|
# 20yymmddhhmmss
|
||||||
ln -sf $f $of
|
# 20yymmdd
|
||||||
done
|
# 20yy.n
|
||||||
popd >/dev/null
|
of=$(perl -p \
|
||||||
done
|
-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() {
|
upload() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue