Xmd/session/src/xmd-load-xresources

31 lines
441 B
Bash
Executable File

#!/bin/sh
name=`basename "$0"`
xResources="${XMD_USERDIR}/Xresources"
isInstalled() {
type "$1" > /dev/null
}
mustHaveInstalled() {
if ! isInstalled "$1"; then
echo "$name: $1 is not installed" >&2
exit 1
fi
}
usage() {
echo "Usage: $name" >&2
exit 2
}
[ "$#" -gt 0 ] && usage
cd ~
if [ -r "$xResources" ]; then
mustHaveInstalled xrdb
xrdb -cpp /usr/bin/cpp < "$xResources"
else
echo "$name: can't find $xResources" >&2
fi