Commit a5dc317e authored by Christopher Alfeld's avatar Christopher Alfeld

Fixed to deal with symbolic links.

parent 92614a39
......@@ -14,11 +14,18 @@ proc outs {args} {
puts $logFp $s
}
if {[file dirname [info script]] == "."} {
set updir ".."
} else {
set updir [file dirname [file dirname [info script]]]
### Bootstrapping code. The whole purpose of this is to find the
# directory containing the script.
set file [info script]
while {![catch "file readlink $file" newfile]} {
set file $newfile
}
set scriptdir [file dirname $file]
if {$scriptdir == "."} {set scriptdir [pwd]}
###
set updir [file dirname $scriptdir]
set nfree "$updir/db/nfree"
set libir "$updir/ir/libir.tcl"
......
......@@ -14,11 +14,18 @@ proc outs {args} {
puts $logFp $s
}
if {[file dirname [info script]] == "."} {
set updir ".."
} else {
set updir [file dirname [file dirname [info script]]]
### Bootstrapping code. The whole purpose of this is to find the
# directory containing the script.
set file [info script]
while {![catch "file readlink $file" newfile]} {
set file $newfile
}
set scriptdir [file dirname $file]
if {$scriptdir == "."} {set scriptdir [pwd]}
###
set updir [file dirname $scriptdir]
set ns2ir "$updir/ir/ns2ir/parse.tcl"
set assign "$updir/ir/assign.tcl"
set handle_ip "$updir/ir/handle_ip.tcl"
......
......@@ -14,12 +14,18 @@ proc outs {args} {
puts $logFp $s
}
set scriptdir [file dirname [info script]]
if {$scriptdir == "."} {
set updir ".."
} else {
set updir [file dirname $scriptdir]
### Bootstrapping code. The whole purpose of this is to find the
# directory containing the script.
set file [info script]
while {![catch "file readlink $file" newfile]} {
set file $newfile
}
set scriptdir [file dirname $file]
if {$scriptdir == "."} {set scriptdir [pwd]}
###
set updir [file dirname $scriptdir]
set snmpit "$updir/switch_tools/intel510/snmpit"
set resetvlans "$updir/switch_tools/intel510/resetvlans.tcl"
set libir "$updir/ir/libir.tcl"
......
Markdown is supported
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