#!/usr/bin/wish8.0
# jfs - wrapper around j:fs
#
######################################################################
# Copyright 1992-1998 by Jay Sekora.  This file may be freely distributed,
# modified or unmodified, for any purpose, provided that this copyright
# notice is retained verbatim in all copies and no attempt is made to
# obscure the authorship of this file.  If you distribute any modified
# versions, I ask, but do not require, that you clearly mark any changes
# you make as such and that you provide your users with instructions for
# getting the original sources.
######################################################################
## begin boiler_header

if {[info exists env(JSTOOLS_LIB)]} {
  set jstools_library $env(JSTOOLS_LIB)
  set jstools_pkg [file join $env(JSTOOLS_LIB) pkg]
} else {
  set jstools_library /usr/lib/jstools
  set jstools_pkg [file join $jstools_library pkg]
}

# add the jstools library to the library search path:

set auto_path  [concat  [list $jstools_pkg]  [list $jstools_library]  $auto_path]

# check for ~/.tk and prepend it to the auto_path if it exists.
# that way the user can override and customise the jstools libraries.

if {[file isdirectory ~/.tk]} then {
  set auto_path [concat [list [glob ~/.tk]] $auto_path]
}

## end boiler_header



wm withdraw .

j:jstools_init jfs

puts stdout [eval j:fs $argv]

exit 0

