From c18711e7aa7c296cf50b0fae1eafd328702a1e9a Mon Sep 17 00:00:00 2001 From: Gordon Schulz Date: Sun, 23 Aug 2015 14:12:43 +0200 Subject: [PATCH] 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. --- rofi-pass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rofi-pass b/rofi-pass index 9ca8454..548193f 100755 --- a/rofi-pass +++ b/rofi-pass @@ -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