aboutsummaryrefslogtreecommitdiff
path: root/modules/voidupdates
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-10-24 20:09:35 +0100
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-10-24 20:09:35 +0100
commit549ccc0f41f20dfce4d3da52a4ff5199a2c03c08 (patch)
treeb0e360d476c874eeaf680fec20bb41b13098587e /modules/voidupdates
parent26d3628594fd20313f19675851051c3bbbc91c44 (diff)
Added networkup and networkdown modules
Diffstat (limited to 'modules/voidupdates')
-rwxr-xr-xmodules/voidupdates16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/voidupdates b/modules/voidupdates
new file mode 100755
index 0000000..229fd42
--- /dev/null
+++ b/modules/voidupdates
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# Prints the number of updates for Void Linux
+
+PREFIX=' Updates: '
+
+get_updates()
+{
+ if ! updates=$(xbps-install -Mun 2> /dev/null | wc -l ); then
+ updates=0
+ fi
+
+ echo "$PREFIX$updates"
+}
+
+get_updates