X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/3bdada4962d3362d915917eaf3675aeff509c3c5..a6a6806a82fa9e2430b44c9e03dd62f9892a4191:/setup diff --git a/setup b/setup index 8331ea1..d1322f5 100755 --- a/setup +++ b/setup @@ -129,30 +129,32 @@ fi ## Symlink the various dotfiles into place dotfiles=" bash_profile bash_logout bashrc inputrc bash_completion - emacs emacs-calc vm - vimrc mg + emacs emacs-calc vm gnus.el ercrc.el + vimrc mg zile + ditz-config mailrc signature cgrc tigrc gdbinit guile + rcrc toprc + mc-ini:.mc/ini mc-panels.ini:.mc/panels.ini aspell.conf lisp-init.lisp:.cmucl-init.lisp lisp-init.lisp:.sbclrc lisp-init.lisp:.clisprc.lisp lisp-init.lisp:.eclrc + swank.lisp dircolors colordiffrc screenrc cvsrc indent.pro" [ "$xstuff" ] && dotfiles="$dotfiles xinitrc xsession Xdefaults vncrc vncsession fonts.conf + stalonetrayrc putty-defaults:.putty/sessions/Default%20Settings eterm-theme.cfg:.Eterm/themes/Eterm/theme.cfg e-keybindings.cfg:.enlightenment/keybindings.cfg evnc-keybindings.cfg:.enlightenment-vnc/keybindings.cfg - e16-bindings:.e16/bindings.cfg - e16-config:.e16/e_config--1.0.cfg - jue-peek.jpg:.enlightenment/backgrounds/jue-peek.jpg - jue-peek.jpg:.e16/backgrounds/jue-peek.jpg" + e16-bindings:.e16/bindings.cfg" echo "Installing dotfiles..." for d in $dotfiles; do target=.$d @@ -162,33 +164,73 @@ for d in $dotfiles; do ft=$HOME$sub/$target dir=${ft%/*} mkdir -p $dir - ln -s $here/$d $ft.new + ln -s $here/dot/$d $ft.new mv $ft.new $ft echo " $target" done echo " all done." -###-------------------------------------------------------------------------- -### Process the Git configuration. - -echo -n "Installing Git configuration:" -sed " +## 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!\ -/@releasekey@/ s::$(./mdw-conf release-key 481334C2):g -/@gitignore@/ s::$(./mdw-conf gitignore $here/gitignore):g -" gitconfig >$HOME/.gitconfig.new -mv $HOME/.gitconfig.new $HOME/.gitconfig -echo " done." +/@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 + hypatia.jpg + noodly.jpg + lovelace.jpg" +if [ "$xstuff" ]; then + echo "Installing backgrounds..." + for b in $backgrounds; do + for e in enlightenment e16; do + dir=$HOME$sub/.$e/backgrounds + t=$dir/$b + mkdir -p $dir + ln -s $here/bg/$b $t.new + mv $t.new $t + done + echo " $b" + done + echo " all done." +fi ###-------------------------------------------------------------------------- ### Install useful scripts included in this package. scripts=" mdw-editor + mdw-pager mdw-conf + mdw-build + emacsclient-hack movemail-hack + aspell-hack emerge-hack lesspipe.sh start-ssh-agent @@ -196,23 +238,38 @@ scripts=" hyperspec" [ "$xstuff" ] && scripts="$scripts xinitcmd + un-backslashify-selection + lock-screen xshutdown" echo "Installing scripts..." mkdir -p $HOME$sub/bin for s in $scripts; do ft=$HOME$sub/bin/$s - ln -s $here/$s $ft.new + ln -s $here/bin/$s $ft.new mv $ft.new $ft echo " $s" done echo " all done." +hacks=" + ssh:ssh" +echo "Installing hacks..." +for h in $hacks; do + d=${h%%:*} h=${h#*:} + ft=$HOME$sub/bin/hacks/$d + mkdir -p $ft + ln -s $here/hacks/$h $ft/$h.new + mv $ft/$h.new $ft/$h + echo " $d:$h" +done +echo " all done." + ###-------------------------------------------------------------------------- ### Set up the Emacs config. $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 @@ -229,6 +286,7 @@ echo "Installing Emacs packages..." emacspkg=" make-regexp ew-hols + mdw-gnus-patch git git-blame vc-git stgit quilt" for elib in $emacspkg; do @@ -241,8 +299,12 @@ for elib in $emacspkg; do (error 1))))'; then echo " already installed." else - $echon " downloading$echoc" - $GETURL $HOME$sub/lib/emacs/$elib.el $REPO/$elib.el + if [ -f el/$elib.el ]; then + cp el/$elib.el $HOME$sub/lib/emacs/$elib.el + else + $echon " downloading$echoc" + $GETURL $HOME$sub/lib/emacs/$elib.el $REPO/$elib.el + fi $echon " compiling$echoc" (cd $HOME$sub/lib/emacs; $emacs >/dev/null 2>&1 --no-site-file --batch \ @@ -254,11 +316,10 @@ echo " all done." $echon "Setting up Emacs configuration:$echoc" $echon " linking$echoc" -for link in dot-emacs.el:dot-emacs.el emacs-Makefile:Makefile; do +for f in dot-emacs.el Makefile; do set -- $(echo $link | tr : ' ') - from=$1 to=$2 - ln -s $here/$from $HOME$sub/lib/emacs/$to.new - mv $HOME$sub/lib/emacs/$to.new $HOME$sub/lib/emacs/$to + ln -s $here/el/$f $HOME$sub/lib/emacs/$f.new + mv $HOME$sub/lib/emacs/$f.new $HOME$sub/lib/emacs/$f done $echon " compiling$echoc" make >/dev/null 2>&1 -C $HOME$sub/lib/emacs EMACS=$emacs