#!/bin/sh # #-*- mode: Fundamental; tab-width: 4; -*- # ex:ts=4 # LOCALBASE=/usr/local X11BASE=/usr/X11R6 list="bin/fbrun bin/fbsetbg bin/fbsetroot bin/fluxbox \ bin/fluxbox-generate_menu bin/startfluxbox share/doc/fluxbox \ share/fluxbox" if [ -d ~/.fluxbox-bak ]; then echo "The ~/.fluxbox-bak exists, need to remove or rename it. Exit." exit 1 fi if [ -d ~/.fluxbox ]; then cp -Rp ~/.fluxbox ~/.fluxbox-bak echo "The ~/.fluxbox has been copied to ~/.fluxbox-bak for backup." else echo "The ~/.fluxbox does not exist, exit." exit 1 fi echo "Change the path in ~/.fluxbox/ starts." echo for p in ${list}; do for f in `find ~/.fluxbox -type f | xargs egrep -l "${X11BASE}/${p}"`; do sed -e "s|${X11BASE}/${p}|${LOCALBASE}/${p}|g" ${f} > ${f}.new; mv ${f}.new ${f}; echo "==>${f}:" echo " ${X11BASE}/${p} -> ${LOCALBASE}/${p}" echo done done echo "Change the path in ~/.fluxbox/* has been completed."