summaryrefslogtreecommitdiffstats
path: root/bin/create_cvs
diff options
context:
space:
mode:
authorTar Committer <tar@ocjtech.us>2000-02-03 17:55:28 +0000
committerTar Committer <tar@ocjtech.us>2000-02-03 17:55:28 +0000
commitb24aa5051db5d4bf9757efe7df06cb1892898382 (patch)
tree9cdcee7bb6f7780d08f94997af4f8232b5bd0417 /bin/create_cvs
parent42de2e53682c49b050f19fdbaaf68451ba487303 (diff)
downloadrancid-b24aa5051db5d4bf9757efe7df06cb1892898382.tar.gz
rancid-b24aa5051db5d4bf9757efe7df06cb1892898382.tar.xz
rancid-b24aa5051db5d4bf9757efe7df06cb1892898382.zip
Imported from rancid-1.4.tar.gz.rancid-1.4
Diffstat (limited to 'bin/create_cvs')
-rwxr-xr-xbin/create_cvs32
1 files changed, 20 insertions, 12 deletions
diff --git a/bin/create_cvs b/bin/create_cvs
index 675cda8..df7e56e 100755
--- a/bin/create_cvs
+++ b/bin/create_cvs
@@ -26,14 +26,21 @@ ENVFILE="`dirname $0`/env"
. $ENVFILE
+# Base dir
+if [ ! -d $BASEDIR ]; then
+ mkdir -p $BASEDIR
+fi
+
+cd $BASEDIR
+
# Top level CVS stuff
if [ ! -d $CVSROOT ]; then
cvs init
fi
# Log dir
-if [ ! -d $BASEDIR/logs ]; then
- mkdir $BASEDIR/logs
+if [ ! -d logs ]; then
+ mkdir logs
fi
# Which groups to do
@@ -57,25 +64,26 @@ do
cd $BASEDIR
cvs co $GROUP
fi
- if [ -d $DIR -a ! -d $DIR/configs ]; then
- cd $DIR
+ cd $DIR
+ if [ ! -d configs ]; then
mkdir configs
cvs add configs
cvs commit -m 'new' configs
- cd $BASEDIR
fi
# main files
- if [ ! -f $DIR/allrouters ]; then
- cd $DIR
- touch $DIR/allrouters
- cd $BASEDIR
+ if [ ! -f routers.all ]; then
+ touch routers.all
fi
- if [ ! -f $DIR/router.db ]; then
- cd $DIR
+ if [ ! -f routers.down ]; then
+ touch routers.down
+ fi
+ if [ ! -f routers.up ]; then
+ touch routers.up
+ fi
+ if [ ! -f router.db ]; then
touch router.db
cvs add router.db
cvs commit -m 'new' router.db
- cd $BASEDIR
fi
done