You are not logged in.
Pages: 1
I want this dialog box to pop up asking if i want to upgrade or not but when i say no the command is still executed.
this is my script:
#!/bin/bash
kdialog --title "Scheduled system update" --yesno "System update \
.\n Do you want to update now?"
konsole -e bash -c "sudo tar -cjf /.Backups/Pacman-Db_Backup/pacman-database.tar.bz2 /var/lib/pacman/local && sudo pacman -Syu && sudo sh /home/oblivion/.Scripts/Pacman-Clean.sh"
exit 0
EDIT: I am VERY new at this so if my script makes you want to vomit, i'm sorry.
Last edited by Oblivion7 (2015-09-10 23:17:41)
Anyone who has never made a mistake has never tried anything new. ~Albert Einstein
Offline
It probably has a non-zero return value on cancel so check for that:
#!/bin/bash
kdialog --title "Scheduled system update" --yesno "System update \
.\n Do you want to update now?"
if [ $? = 0 ]; then
konsole -e bash -c "sudo tar -cjf /.Backups/Pacman-Db_Backup/pacman-database.tar.bz2 /var/lib/pacman/local && sudo pacman -Syu && sudo sh /home/oblivion/.Scripts/Pacman-Clean.sh"
fi
exit 0
See also: https://techbase.kde.org/Development/Tu … DE_Dialogs
Last edited by V1del (2015-09-11 00:32:22)
Online
Pages: 1