From 07210faee797dcfbad254edc132b187790834db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Suchomel?= Date: Fri, 28 Jun 2019 19:47:01 +0200 Subject: [PATCH] Use zypper for package install on SUSE based distros Change-Id: I86a97a42530df6bc92da0951c90a9ca0cf23c463 --- tools/airship | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/airship b/tools/airship index f82dab886..d2848f52e 100755 --- a/tools/airship +++ b/tools/airship @@ -20,8 +20,11 @@ test -t 1 && test -t 0 && DEFAULT_TERM_OPTS='-it' : ${TERM_OPTS:=${DEFAULT_TERM_OPTS}} # Python YAML module required to read versions.yaml -sudo dpkg -s python3-yaml &> /dev/null || sudo apt -y install python3-yaml - +if grep -iq suse /etc/os-release; then + rpm -q python3-pyaml --quiet || zypper --non-interactive install python3-pyaml +else + dpkg -s python3-yaml &> /dev/null || apt -y install python3-yaml +fi ENV_FILE=$(mktemp) trap "{ rm -f $ENV_FILE; }" EXIT