From ce0380e4df15a8fa2cbad87f57c6bdf3e8e9c02e Mon Sep 17 00:00:00 2001 From: Wojtek Porczyk Date: Wed, 30 Sep 2020 21:27:39 +0200 Subject: [PATCH] [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 --- .ci/isdistro | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 .ci/isdistro diff --git a/.ci/isdistro b/.ci/isdistro new file mode 100755 index 00000000..e8890032 --- /dev/null +++ b/.ci/isdistro @@ -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