add configuration file for notify-updates
This commit is contained in:
parent
dfa9bb1106
commit
5e2f1f2656
3 changed files with 22 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ _notify_none=0
|
|||
_error_code=0
|
||||
_show_help=0
|
||||
_hostname=$(hostname)
|
||||
_config_file="$HOME/.config/notify-updates/notify-updates.config"
|
||||
|
||||
if ! [ -f "$_target_file" ] ;
|
||||
then
|
||||
|
|
@ -37,6 +38,19 @@ if [ "$_error_code" -gt 0 ] ; then
|
|||
exit "$_error_code"
|
||||
fi
|
||||
|
||||
# TODO use $XDG_CONFIG_HOME
|
||||
if [ -f "$_config_file" ] ; then
|
||||
. "$_config_file"
|
||||
else
|
||||
echo "notify-updates: warning - config file not found: $_config_file"
|
||||
fi
|
||||
|
||||
if [ "$notifynone" = "true" ] ; then
|
||||
_notify_none=1
|
||||
elif [ "$notifynone" = "false" ] ; then
|
||||
_notify_none=0
|
||||
fi
|
||||
|
||||
_updates_available=$(cat $_target_file)
|
||||
|
||||
if [ "$_updates_available" -gt 0 ] ; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue