mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
pkg-manager.sh: Add command dup
Add command dup (dist-upgrade), currently only supported on OpenSUSE. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
fa1f1f8b92
commit
cb2fa0c755
1 changed files with 39 additions and 0 deletions
|
|
@ -29,6 +29,45 @@ run()
|
||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmd_dup()
|
||||||
|
{
|
||||||
|
local env opts global_opts
|
||||||
|
local non_interactive
|
||||||
|
|
||||||
|
set -- `getopt 'y' $*`
|
||||||
|
while [ "$1" != -- ] ; do
|
||||||
|
case "$1" in
|
||||||
|
-y)
|
||||||
|
non_interactive=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
case $ID in
|
||||||
|
opensuse|suse)
|
||||||
|
[ "$non_interactive" = 1 ] && {
|
||||||
|
opts="--force-resolution --auto-agree-with-licenses"
|
||||||
|
global_opts="$global_opts --non-interactive --gpg-auto-import-keys --no-gpg-checks"
|
||||||
|
}
|
||||||
|
run sudo $env -S zypper $global_opts dup $opts "$@"
|
||||||
|
;;
|
||||||
|
debian|ubuntu|raspbian)
|
||||||
|
fatal "Tried to run distribution upgrade on unsupported platform \"$ID\""
|
||||||
|
;;
|
||||||
|
arch)
|
||||||
|
fatal "Tried to run distribution upgrade on unsupported platform \"$ID\""
|
||||||
|
;;
|
||||||
|
centos)
|
||||||
|
fatal "Tried to run distribution upgrade on unsupported platform \"$ID\""
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
fatal "Tried to install on unsupported platform \"$ID\""
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
cmd_install()
|
cmd_install()
|
||||||
{
|
{
|
||||||
local env opts global_opts
|
local env opts global_opts
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue