I am trying to have my own bash script Frugghi issh script to generate libssl and libssh libraries for apple platforms. Reason why i want to try my own bash script is to fetch the recent libs and keep updated.
I have two bash scripts to detect the recent version of openssl and libssh2 libs:
getLibssh2Version () {
if type git >/dev/null 2>&1; then
LIBSSH_VERSION=`git ls-remote --tags https://github.com/libssh2/libssh2.git | egrep "libssh2-[0-9]+(\.[0-9])*[a-zA-Z]?$" | cut -f 2 -d - | sort -t . -r | head -n 1`
LIBSSH_AUTO=true
}
and
getOpensslVersion () {
if type git >/dev/null 2>&1; then
LIBSSL_VERSION=`git ls-remote --tags git://git.openssl.org/openssl.git | egrep "OpenSSL(_[0-9])+[a-zA-Z]?$" | cut -f 2,3,4 -d _ | sort -t _ -r | head -n 1 | tr _ .`
LIBSSL_AUTO=true
}
But the first script fetches the Libssh2 of 1.9.0 version instead of 1.10.0 and the second script fetches OpenSSL of 1.1.1n series instead of 3.0.2 (though both are same). I guess it is something related to the regular expression defined . Can someone sort out this script error?