X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Ffunctions.sh;h=2b4d74370bbdd1c15092ff59d8a9b4e70395134e;hb=HEAD;hp=f198f6220eff123e9e3c4269150c3329f70e2d1c;hpb=bd0ffc10ddeadfaac6043f5f0b0327a52cce0606;p=carnet-upgrade.git diff --git a/src/functions.sh b/src/functions.sh index f198f62..2b4d743 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -19,6 +19,14 @@ first_warning () { fi } +second_warning () { + LC_MESSAGES=hr_HR dialog --backtitle "$title" --yesno "$msg_second_warning" 18 75 + if [ $? -ne 0 ]; then + log "Upgrade canceled." + exit 0 + fi +} + pkg() { local version dpkg -l "$1" 2> /dev/null | egrep -q "^.i" || return 1 @@ -160,6 +168,17 @@ remove_x() { } remove_bloat() { +### zelja 2023-07-06 +tempdelfile=$(mktemp /tmp/tempdelfile.XXXX) + +for a in $bloats; do echo apt-get -qq -y remove $a 2\> /dev/null ; done > $tempdelfile + +/bin/bash $tempdelfile +rm $tempdelfile + +return 0 + + local to_remove add_this i j n text to_show cmd tmpfile installed local update_selections pkgs_to_deselect pkgs_to_remove oldifs pkglist text="$msg_remove_bloat" @@ -218,6 +237,9 @@ remove_bloat() { } remove_cn_bloat() { +### Sve obrisano u remove_bloat() +return 0 + local installed pkg cn_pkgs dialog_list selection cn_del to_del del_pkgs # get installed packages