[CI] Add isdistro helper script

Usage:

    if ./isdistro buster
    then
        echo Debian 10
    elif ./isdistro xenial
    then
        echo Ubuntu 16.04
    elif ./isdistro fedora-32
    then
        echo Fedora 32
    else
        echo None of the above
    fi
This commit is contained in:
Wojtek Porczyk
2020-11-04 15:34:14 +01:00
parent 79ce612793
commit ce0380e4df
Executable
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
test "$#" -eq 1 || exit 2
. /etc/os-release || exit 3
test "$1" = "$VERSION_CODENAME" || test "$1" = "$ID"-"$VERSION_ID" || exit 1