Commit fbf2d478 authored by Christopher Alfeld's avatar Christopher Alfeld
Browse files

Updated to be better aboout installation.

parent 906c4efe
......@@ -23,9 +23,14 @@ while {![catch "file readlink $file" newfile]} {
set scriptdir [file dirname $file]
if {$scriptdir == "."} {set scriptdir [pwd]}
###
set updir [file dirname $scriptdir]
if {[file exists $scriptdir/ns2ir]} {
# development tree
set updir [file dirname $scriptdir]
} else {
# install tree
set updir [file dirname $scriptdir]/lib
set scriptdir [file dirname $scriptdir]/lib/tbsetup
}
set nfree "$updir/db/nfree"
set libir "$scriptdir/ir/libir.tcl"
......
......@@ -26,7 +26,6 @@ proc unlock {} {
}
}
### Bootstrapping code. The whole purpose of this is to find the
# directory containing the script.
set file [info script]
......@@ -36,8 +35,14 @@ while {![catch "file readlink $file" newfile]} {
set scriptdir [file dirname $file]
if {$scriptdir == "."} {set scriptdir [pwd]}
###
set updir [file dirname $scriptdir]
if {[file exists $scriptdir/ns2ir]} {
# development tree
set updir [file dirname $scriptdir]
} else {
# install tree
set updir [file dirname $scriptdir]/lib
set scriptdir [file dirname $scriptdir]/lib/tbsetup
}
set lockfile "/usr/testbed/locks/tblock"
set ns2ir "$scriptdir/ns2ir/parse.tcl"
......
......@@ -10,8 +10,15 @@ while {![catch "file readlink $file" newfile]} {
set scriptdir [file dirname $file]
if {$scriptdir == "."} {set scriptdir [pwd]}
###
if {[file exists $scriptdir/ns2ir]} {
# development tree
set updir [file dirname $scriptdir]
} else {
# install tree
set updir [file dirname $scriptdir]/lib
set scriptdir [file dirname $scriptdir]/lib/tbsetup
}
set updir [file dirname $scriptdir]
source $scriptdir/ir/libir.tcl
load $updir/lib/sql.so
......
......@@ -29,8 +29,14 @@ while {![catch "file readlink $file" newfile]} {
set scriptdir [file dirname $file]
if {$scriptdir == "."} {set scriptdir [pwd]}
###
set updir [file dirname $scriptdir]
if {[file exists $scriptdir/ns2ir]} {
# development tree
set updir [file dirname $scriptdir]
} else {
# install tree
set updir [file dirname $scriptdir]/lib
set scriptdir [file dirname $scriptdir]/lib/tbsetup
}
set snmpit "$scriptdir/snmpit"
set resetvlans "$updir/switch_tools/intel510/resetvlans.tcl"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment