More descriptively name latest release archives

This commit is contained in:
BtbN 2021-12-24 19:07:28 +01:00
parent 490e081b18
commit db4e36b8f1

View file

@ -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