+echo " all done."
+
+###--------------------------------------------------------------------------
+### Process the Git configuration.
+
+echo -n "Installing Git configuration:"
+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."
+
+###--------------------------------------------------------------------------
+### Install useful scripts included in this package.
+
+scripts="
+ mdw-editor
+ mdw-conf
+ mdw-build
+ movemail-hack
+ emerge-hack
+ lesspipe.sh
+ start-ssh-agent
+ svnwrap
+ hyperspec"
+[ "$xstuff" ] && scripts="$scripts
+ xinitcmd
+ 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
+ mv $ft.new $ft
+ echo " $s"
+done
+echo " all done."
+
+###--------------------------------------------------------------------------
+### Set up the Emacs config.
+
+$echon "Finding a suitable emacs:$echoc"
+emacs=no
+for i in emacs22 emacs21 emacs; do
+ if type -p >/dev/null $i; then
+ emacs=$i
+ break
+ fi
+done
+if [ $emacs = no ]; then
+ echo " failed."
+ emacs=:
+else
+ echo " $emacs."
+fi