Check if system-wide config exists before sourcing
When /etc/rofi-pass.conf did not exist, rofi-pass would spit out an error message to the console. Better check for the file's existence before sourcing.
This commit is contained in:
parent
93241ba424
commit
c18711e7aa
@ -6,8 +6,10 @@
|
||||
# enable extended globbing
|
||||
shopt -s nullglob globstar
|
||||
|
||||
# read global config file
|
||||
source /etc/rofi-pass.conf
|
||||
# check if global config exists and load it
|
||||
if [[ -f /etc/rofi-pass.conf ]]; then
|
||||
source /etc/rofi-pass.conf
|
||||
fi
|
||||
|
||||
# check if local config exists and load it
|
||||
if [[ -f $HOME/.config/rofi-pass/config ]]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user