From f7cb5c8483a2a251b6cc0f968a179ed76f0f883f Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 23 Jul 2015 09:50:10 +0100 Subject: [PATCH] setup: Preprocess the Xdefaults file before installing it. Now applications can read the resources even if they haven't been attached to the root window. --- setup | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/setup b/setup index 2d5a0d0..2b2ead2 100755 --- a/setup +++ b/setup @@ -153,7 +153,7 @@ dotfiles=" w3m-config:.w3m/config elinks.conf:.elinks/elinks.conf dircolors colordiffrc screenrc cvsrc indent.pro" [ "$xstuff" ] && dotfiles="$dotfiles - xinitrc xsession xmodmap Xdefaults vncrc vncsession + xinitrc xsession xmodmap vncrc vncsession fonts.conf stalonetrayrc putty-defaults:.putty/sessions/Default%20Settings @@ -177,6 +177,25 @@ for d in $dotfiles; do done echo " all done." +## CPP-hack files which need it. +cppfiles="" +[ "$xstuff" ] && cppfiles="$cppfiles + Xdefaults" +echo "Hacking files with C preprocessor..." +for c in $cppfiles; do + target=.$c + case $c in + *:*) target=${c#*:} c=${c%%:*};; + esac + ft=$HOME$sub/$target + dir=${ft%/*} + mkdir -p $dir + cpp dot/$c -o $ft.new + mv $ft.new $ft + echo " $target" +done +echo " all done." + ## Substitute things which need substituting. dotfilessubst=" gitconfig -- 2.11.0