summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/jadupc.apt1
-rwxr-xr-xdata/perform-system-update15
-rwxr-xr-xdata/perform-system-update.desktop12
-rwxr-xr-xdata/xdg/perform-system-update.desktop6
-rw-r--r--debian/changelog6
-rw-r--r--debian/control5
-rw-r--r--debian/install4
7 files changed, 47 insertions, 2 deletions
diff --git a/data/jadupc.apt b/data/jadupc.apt
new file mode 100644
index 0000000..b45e607
--- /dev/null
+++ b/data/jadupc.apt
@@ -0,0 +1 @@
+jadupc ALL=(ALL) NOPASSWD: /usr/bin/apt
diff --git a/data/perform-system-update b/data/perform-system-update
new file mode 100755
index 0000000..bb7f252
--- /dev/null
+++ b/data/perform-system-update
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+if [[ $1 == "check" ]]; then
+ sudo apt update
+ if apt list --upgradable 2> /dev/null | grep -v '^Listing' | grep -q .; then
+ exo-open --launch TerminalEmulator "$0"
+ fi
+else
+ echo -e "$(tput setaf 3)Please wait while the system in upgrading...$(tput sgr0)"
+
+ sudo apt autoremove -y
+ sudo apt upgrade -y
+ echo -e "$(tput setaf 2)Done! You can now close this window $(tput sgr0)"
+fi
+exit 0
diff --git a/data/perform-system-update.desktop b/data/perform-system-update.desktop
new file mode 100755
index 0000000..72c28cb
--- /dev/null
+++ b/data/perform-system-update.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Name=Perform System Update
+Type=Application
+Exec=perform-system-update check
+Terminal=true
+Hidden=false
+Categories=System; Utility
+StartupWMClass=System Updater
+Comment=Perform a quick system update
+Icon=system-software-update
+StartupNotify=false
+MimeType=application/x-shellscript
diff --git a/data/xdg/perform-system-update.desktop b/data/xdg/perform-system-update.desktop
new file mode 100755
index 0000000..cbc2a25
--- /dev/null
+++ b/data/xdg/perform-system-update.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Name=Perform System Update
+Type=Application
+Exec=perform-system-update check
+Comment=Perform a quick system update
+Icon=system-software-update
diff --git a/debian/changelog b/debian/changelog
index 4b4a7d5..f40a9b4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+shopno-os-apt-notifier (1.0.1) shopno; urgency=medium
+
+ * Fix negated update logic
+
+ -- Mubashshir <ahm@jadupc.com> Wed, 15 Mar 2023 23:12:19 +0600
+
shopno-os-apt-notifier (1.0.0) shopno; urgency=medium
* Initial Release
diff --git a/debian/control b/debian/control
index 62f6c7a..e27839b 100644
--- a/debian/control
+++ b/debian/control
@@ -1,11 +1,12 @@
Source: shopno-os-apt-notifier
-Priority: optional
+Section: admin
+Priority: required
Maintainer: Mubashshir <ahm@jadupc.com>
Build-Depends: debhelper-compat (= 13), dh-exec
Standards-Version: 4.5.0
Vcs-Git: https://builder.jadupc.com/git/pkgs/shopno-os-apt-notifier
Vcs-Browser: https://builder.jadupc.com/git/pkgs/shopno-os-apt-notifier
-Rules-Requires-Root: no
+Rules-Requires-Root: binary-targets
Package: shopno-os-apt-notifier
Architecture: all
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..602ef70
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,4 @@
+data/perform-system-update usr/bin
+data/perform-system-update.desktop usr/share/applications
+data/jadupc.apt etc/sudoers.d
+data/xdg/perform-system-update.desktop etc/xdg/autostart