From 4b91694321a38f688d7f4aac868810c4c9eea2d9 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sat, 13 Sep 2025 15:31:34 +0300 Subject: [PATCH] Add check-version.sh script --- check-version.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 check-version.sh diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..288086c --- /dev/null +++ b/check-version.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +URL="ftp://download.videolan.org/pub/videolan/x264/snapshots/" + +# Get version number from FTP server +VERSION=$(curl -s --list-only "$URL" | grep '^x264-snapshot-.*.tar.bz2$' | grep -o -E '[0-9]{1,}-[0-9]{1,}' | sort -V | tail -n1) + +# Replace '-' with '.' +VERSION=${VERSION//-/.} + +echo "$VERSION"