get-os.sh, pkg-manager.sh: Add dependencies for Ubuntu

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2018-01-04 01:45:24 +00:00
commit 77aabcc7d6
2 changed files with 7 additions and 3 deletions

View file

@ -48,7 +48,9 @@ cmd_name_version()
if grep -qi tumbleweed /etc/os-release; then if grep -qi tumbleweed /etc/os-release; then
echo suse-tumbleweed echo suse-tumbleweed
else else
[ "$ID_LIKE" ] && ID=$ID_LIKE if [ "$ID" != ubuntu ]; then
[ "$ID_LIKE" ] && ID=$ID_LIKE
fi
case "$ID" in case "$ID" in
debian) debian)
VERSION_NAME=`echo $PRETTY_NAME | awk 'NF>1{print $NF}' | sed 's%/.*%%' | tr '[A-Z]' '[a-z]'` 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 esac
;; ;;
ubuntu)
;;
*) *)
VERSION_ID=42 VERSION_ID=42
;; ;;

View file

@ -53,7 +53,7 @@ cmd_install()
} }
eval run sudo $env -S zypper $global_opts install $opts "$@" eval run sudo $env -S zypper $global_opts install $opts "$@"
;; ;;
debian) debian|ubuntu)
[ "$non_interactive" = 1 ] && { [ "$non_interactive" = 1 ] && {
global_opts="$global_opts -yq" global_opts="$global_opts -yq"
env="$env DEBIAN_FRONTEND=noninteractive" env="$env DEBIAN_FRONTEND=noninteractive"
@ -96,7 +96,7 @@ cmd_refresh()
} }
eval run sudo $env -S zypper $global_opts refresh $opts "$@" eval run sudo $env -S zypper $global_opts refresh $opts "$@"
;; ;;
debian) debian|ubuntu)
eval run sudo $env -S apt-get $global_opts update "$@" eval run sudo $env -S apt-get $global_opts update "$@"
;; ;;
*) *)