2
0
Fork 0
mirror of https://github.com/friendica/docker synced 2026-01-02 08:53:33 +01:00

Bugfixing version_greater() method

This commit is contained in:
Philipp Holzer 2019-06-16 15:04:36 +02:00
commit 2afdf08eed
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
12 changed files with 50 additions and 10 deletions

View file

@ -12,7 +12,7 @@ run_as() {
# checks if the the first parameter is greater than the second parameter
version_greater() {
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 | head -n 1)" != "$1" ]
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
}
# clones the whole develop branch (Friendica and Addons)