From db4e36b8f111a69de4c7a7cf52f3dbea849e8859 Mon Sep 17 00:00:00 2001 From: BtbN Date: Fri, 24 Dec 2021 19:07:28 +0100 Subject: [PATCH] More descriptively name latest release archives --- util/repack_latest.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/util/repack_latest.sh b/util/repack_latest.sh index 919603f..0d3e35c 100755 --- a/util/repack_latest.sh +++ b/util/repack_latest.sh @@ -31,7 +31,15 @@ while [[ $# -gt 0 ]]; do cd repack_dir INAME="$(echo ffmpeg-*)" - ONAME="ffmpeg-latest-$(cut -d- -f5- <<<"$INAME")" + TAGNAME="$(cut -d- -f2 <<<"$INAME")" + + if [[ $TAGNAME == N ]]; then + TAGNAME="master" + elif [[ $TAGNAME == n* ]]; then + TAGNAME="$(sed -re 's/([0-9]+\.[0-9]+).*/\1/' <<<"$TAGNAME")" + fi + + ONAME="ffmpeg-$TAGNAME-latest-$(cut -d- -f5- <<<"$INAME")" mv "$INAME" "$ONAME" if [[ $INPUT == *.zip ]]; then