X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/960af1a5ea8c901d1fee315bfa9ff0b3c865abff..403dc17837643174f2ff25d1ae14a48ae37508c7:/setup diff --git a/setup b/setup index 1d9ec4f..94dc65d 100755 --- a/setup +++ b/setup @@ -167,12 +167,41 @@ for d in $dotfiles; do done echo " all done." +## Substitute things which need substituting. +dotfilessubst=" + gitconfig + pulse-default.pa.in:.pulse/default.pa" +echo "Installing dotfiles with substitutions..." +for d in $dotfilessubst; do + case $d in + *:*) target=${d#*:} d=${d%%:*};; + *) target=.$d d=$d.in;; + esac + ft=$HOME$sub/$target + dir=${ft%/*} + mkdir -p $dir + sed " +1i\ +### generated by $here/setup; do not edit!\ + +/@home@/ s$HOMEg +/@releasekey@/ s$(bin/mdw-conf release-key 481334C2)g +/@gitignore@/ s$(bin/mdw-conf gitignore $here/git/gitignore)g +" dot/$d >$ft.new + mv $ft.new $ft + echo " $target" +done +echo " all done." + ## Symlink backgrounds. backgrounds=" jue-peek.jpg medusa.jpg + bsg-supper.jpg rayne.jpg - noodly.jpg" + hypatia.jpg + noodly.jpg + lovelace.jpg" if [ "$xstuff" ]; then echo "Installing backgrounds..." for b in $backgrounds; do @@ -189,20 +218,6 @@ if [ "$xstuff" ]; then fi ###-------------------------------------------------------------------------- -### Process the Git configuration. - -echo -n "Installing Git configuration:" -sed " -1i\ -### generated by $here/setup; do not edit!\ - -/@releasekey@/ s::$(bin/mdw-conf release-key 481334C2):g -/@gitignore@/ s::$(bin/mdw-conf gitignore $here/git/gitignore):g -" git/gitconfig >$HOME/.gitconfig.new -mv $HOME/.gitconfig.new $HOME/.gitconfig -echo " done." - -###-------------------------------------------------------------------------- ### Install useful scripts included in this package. scripts=" @@ -210,6 +225,7 @@ scripts=" mdw-pager mdw-conf mdw-build + emacsclient-hack movemail-hack emerge-hack lesspipe.sh @@ -219,6 +235,7 @@ scripts=" [ "$xstuff" ] && scripts="$scripts xinitcmd un-backslashify-selection + lock-screen xshutdown" echo "Installing scripts..." mkdir -p $HOME$sub/bin @@ -235,7 +252,7 @@ echo " all done." $echon "Finding a suitable emacs:$echoc" emacs=no -for i in emacs22 emacs21 emacs; do +for i in emacs22 emacs23 emacs21 emacs; do if type -p >/dev/null $i; then emacs=$i break