From 6343210d90bba24dc292f0a47997654875c36d0e Mon Sep 17 00:00:00 2001 From: Lucas Date: Tue, 20 Jun 2023 00:47:14 +0000 Subject: [PATCH] Consistently use -r instead of -f for conditional shell sourcing --- dotfiles/shrc | 2 +- mblaze/env | 4 ++-- xdg-config-dir/herbstluftwm/autostart | 4 ++-- xdg-config-dir/herbstluftwm/herbstpanel.sh | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dotfiles/shrc b/dotfiles/shrc index bbc559a..dbb827c 100644 --- a/dotfiles/shrc +++ b/dotfiles/shrc @@ -71,7 +71,7 @@ if command -v calendar >/dev/null && [ -f ~/.calendar/calendar ]; then calendar fi -if [ -s ~/.shrc.local ]; then +if [ -r ~/.shrc.local ]; then . ~/.shrc.local fi diff --git a/mblaze/env b/mblaze/env index 32fa470..6a7574c 100644 --- a/mblaze/env +++ b/mblaze/env @@ -1,5 +1,5 @@ # mblaze.env -# Written in 2020 by Lucas +# Written in 2020,2023 by Lucas # CC0 1.0 Universal/Public domain - No rights reserved # # To the extent possible under law, the author(s) have dedicated all @@ -45,7 +45,7 @@ MCOLOR_QUOTE=3 export MCOLOR_SEP MCOLOR_FROM MCOLOR_HEADER MCOLOR_FOOTER MCOLOR_SIG export MCOLOR_QQQUOTE MCOLOR_QQUOTE MCOLOR_QUOTE -if [ -f "$MBLAZE/private.env" ]; then +if [ -r "$MBLAZE/private.env" ]; then . "$MBLAZE/private.env" fi diff --git a/xdg-config-dir/herbstluftwm/autostart b/xdg-config-dir/herbstluftwm/autostart index 632f1c5..66255b7 100755 --- a/xdg-config-dir/herbstluftwm/autostart +++ b/xdg-config-dir/herbstluftwm/autostart @@ -1,6 +1,6 @@ #!/bin/sh # env -# Written in 2019-2020,2022 by Lucas +# Written in 2019-2020,2022-2023 by Lucas # CC0 1.0 Universal/Public domain - No rights reserved # # To the extent possible under law, the author(s) have dedicated all @@ -10,7 +10,7 @@ # Dedication along with this software. If not, see # . -if [ -f ~/.config/herbstluftwm/theme ]; then +if [ -r ~/.config/herbstluftwm/theme ]; then . ~/.config/herbstluftwm/theme fi diff --git a/xdg-config-dir/herbstluftwm/herbstpanel.sh b/xdg-config-dir/herbstluftwm/herbstpanel.sh index 9aa1eaf..8e36109 100644 --- a/xdg-config-dir/herbstluftwm/herbstpanel.sh +++ b/xdg-config-dir/herbstluftwm/herbstpanel.sh @@ -1,6 +1,6 @@ #!/bin/sh # env -# Written in 2019-2020 by Lucas +# Written in 2019-2020,2023 by Lucas # CC0 1.0 Universal/Public domain - No rights reserved # # To the extent possible under law, the author(s) have dedicated all @@ -10,7 +10,7 @@ # Dedication along with this software. If not, see # . -if [ -f ~/.config/herbstluftwm/theme ]; then +if [ -r ~/.config/herbstluftwm/theme ]; then . ~/.config/herbstluftwm/theme fi