catalyst-auto: Combine common functions
Signed-off-by: Matt Turner <mattst88@gentoo.org>
This commit is contained in:
parent
41cdecd812
commit
492aacba77
20 changed files with 19 additions and 277 deletions
|
@ -10,25 +10,6 @@ KCONFIG_DIR=${REPO_DIR}/releases/weekly/kconfig/sparc
|
|||
|
||||
EMAIL_SUBJECT_PREPEND="[sparc-auto]"
|
||||
|
||||
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 '~' '-'
|
||||
}
|
||||
|
||||
# Replace the date/time stamp in the filename to "latest".
|
||||
# Forms we handle:
|
||||
# stage3-xxx-2018.0.tar.xz
|
||||
# stage3-xxx-20180116.tar.xz
|
||||
# stage3-xxx-20180116T015819Z.tar.xz
|
||||
convert_filename() {
|
||||
sed -E 's:-20[0-9]+(\.[0-9]+|T[0-9]+Z)?:-latest:g'
|
||||
}
|
||||
|
||||
update_symlinks() {
|
||||
# Symlink the latest stages3 to build from
|
||||
local d f
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue