Consistently use -r instead of -f for conditional shell sourcing

This commit is contained in:
Lucas 2023-06-20 00:47:14 +00:00
parent 432832cd5a
commit 6343210d90
4 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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
# <http://creativecommons.org/publicdomain/zero/1.0/>.
if [ -f ~/.config/herbstluftwm/theme ]; then
if [ -r ~/.config/herbstluftwm/theme ]; then
. ~/.config/herbstluftwm/theme
fi

View File

@ -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
# <http://creativecommons.org/publicdomain/zero/1.0/>.
if [ -f ~/.config/herbstluftwm/theme ]; then
if [ -r ~/.config/herbstluftwm/theme ]; then
. ~/.config/herbstluftwm/theme
fi