#!/bin/bash ############################################################################ # This script replaces the
and tags # with the UXSUP server side includes. It take two args, the first is the # directory used to add the correct navigation sub-menu. the second is a # directory of files, or a single file to add the includes to. ############################################################################ NAV_DIR=${1} if test -d ${2} then FILES=`ls ${2}/*.html` else FILES=${2} fi for i in ${FILES} do NAME=`basename "$i"` DIRNAME=`dirname "$i"` echo "editing $i:" # make sure we don't edit the sed_script if test "$i" = sed_script; then echo "not editing sed_script!" elif test -s $i; then # make the changes and output to a temp file sed -e "s///g" -e "s///g" -e "s/<\/head>//g" -e "s///g" -e "s/<\/body>//g" -e "s/<\/html>//g" -e "s/