Added stanza for cfbku and generally touched up code, error message, etc.
1 parent 7fba5ab commit 16454aee8cb92de98b7423657ff5e6ced1ec2432
@root root authored on 4 Aug 2007
Showing 1 changed file
View
32
tconfigfiles
#!/bin/sh
# tconfigfiles - Manage Configuration Files
# Copyright (c) 2007 TundraWare Inc., Des Plaines, IL USA
# All Rights Reserved
# $Id: tconfigfiles,v 1.101 2007/08/04 06:02:33 root Exp $
# $Id: tconfigfiles,v 1.102 2007/08/04 06:43:30 root Exp $
 
BASE="\/root\/sysgen\/configtree"
 
case `basename $0`
SBASE="\/root\/sysgen\/configtree"
BASE=`echo $SBASE | sed s/\\\\\\\\//g`
CMD=`basename $0`
 
case $CMD
in
 
"cfinstall")
"cfinstall") # Install configuration files from tree
for f in $*
do
canonicaldir=`pwd | sed s/$BASE//`
cp -pvR $f $canonicaldir
targetdir=`pwd | sed s/$SBASE//`
cp -pvR $f $targetdir
done
;;
 
 
"cfbku") # Backup configuration files to tree
for f in $*
do
bkudir=$BASE`pwd`/
mkdir -p $bkudir
cp -pvR $f $bkudir
done
;;
 
 
*)
echo "Unkown Command: $0"
echo "Unknown Command ===> $CMD"
exit 1
;;
 
esac