refinement
This commit is contained in:
parent
2cc10d34ae
commit
a765639c85
@ -1,14 +1,20 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -ex
|
||||||
|
|
||||||
argv0="$0"
|
argv0="$0"
|
||||||
|
|
||||||
# cats out the configuration or {'\n', EOF} if it can't be found
|
# cats out the configuration or {'\n', EOF} if it can't be found
|
||||||
stream_config(){
|
stream_config(){
|
||||||
cat "$HOME"/.xdg-sanity.conf 2>/dev/null \
|
for file in \
|
||||||
|| cat "$HOME"/.config/xdg-sanity.conf 2>/dev/null \
|
"$HOME"/.config/xdg-sanity.conf \
|
||||||
|| cat /etc/xdg-sanity/xdg-sanity.conf 2>/dev/null \
|
"$HOME"/.xdg-sanity.conf \
|
||||||
|| echo # empty line
|
/etc/xdg-sanity/xdg-sanity.conf \
|
||||||
|
/dev/null
|
||||||
|
do
|
||||||
|
cat "$file" 2>/dev/null \
|
||||||
|
&& break \
|
||||||
|
|| true
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# check if usage is valid
|
# check if usage is valid
|
||||||
|
Loading…
Reference in New Issue
Block a user