From 77aabcc7d6cc83ff23b1f58e68fcbedcbb1f510d Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Thu, 4 Jan 2018 01:45:24 +0000 Subject: [PATCH] get-os.sh, pkg-manager.sh: Add dependencies for Ubuntu Signed-off-by: Jan Lindemann --- scripts/get-os.sh | 6 +++++- scripts/pkg-manager.sh | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/get-os.sh b/scripts/get-os.sh index b3adf65c..948a685e 100755 --- a/scripts/get-os.sh +++ b/scripts/get-os.sh @@ -48,7 +48,9 @@ cmd_name_version() if grep -qi tumbleweed /etc/os-release; then echo suse-tumbleweed else - [ "$ID_LIKE" ] && ID=$ID_LIKE + if [ "$ID" != ubuntu ]; then + [ "$ID_LIKE" ] && ID=$ID_LIKE + fi case "$ID" in debian) VERSION_NAME=`echo $PRETTY_NAME | awk 'NF>1{print $NF}' | sed 's%/.*%%' | tr '[A-Z]' '[a-z]'` @@ -69,6 +71,8 @@ cmd_name_version() ;; esac ;; + ubuntu) + ;; *) VERSION_ID=42 ;; diff --git a/scripts/pkg-manager.sh b/scripts/pkg-manager.sh index 92a25d6e..50ae9844 100644 --- a/scripts/pkg-manager.sh +++ b/scripts/pkg-manager.sh @@ -53,7 +53,7 @@ cmd_install() } eval run sudo $env -S zypper $global_opts install $opts "$@" ;; - debian) + debian|ubuntu) [ "$non_interactive" = 1 ] && { global_opts="$global_opts -yq" env="$env DEBIAN_FRONTEND=noninteractive" @@ -96,7 +96,7 @@ cmd_refresh() } eval run sudo $env -S zypper $global_opts refresh $opts "$@" ;; - debian) + debian|ubuntu) eval run sudo $env -S apt-get $global_opts update "$@" ;; *)