xrdbupdate: Change logging style

This commit is contained in:
Salt 2018-08-27 13:39:37 -05:00
parent 7534652fca
commit 8c4a092a48

View File

@ -1,14 +1,15 @@
#!/bin/sh #!/bin/sh
name="$(basename $0)"
printf "[INFO] Loading X resource files\n" printf "[INFO] Loading X resource files\n"
if [ -r ~/.Xresources ]; then if [ -r ~/.Xresources ]; then
xrdb ~/.Xresources xrdb ~/.Xresources
printf " [INFO] Loading .Xresources\n" printf "$name: Loading .Xresources\n"
fi fi
for file in "${XDG_CONFIG_HOME:-$HOME/.config}"/xrdb/*.xresources; do for file in "${XDG_CONFIG_HOME:-$HOME/.config}"/xrdb/*.xresources; do
if ! [ -r "$file" ]; then if ! [ -r "$file" ]; then
printf " [ERROR] Could not read .xresources file $file\n" 1>&2 printf "$name: Could not read .xresources file \"$file\"\n" 1>&2
else else
printf " [INFO] Merging in $file\n" printf "$name: Merging in $file\n"
xrdb -merge "$file" xrdb -merge "$file"
fi fi
done done