#! /bin/sh

file="xsemigroup.tcl"
path=`which wish`

if test "$path" = ""
then
    echo "The wish interpreter was not found, you should install Tcl/Tk"
    exit 1
fi

echo "#!" $path > $file
cat ${file}.in >> $file

chmod +x $file


file="xautomaton.tcl"
 
echo "#!" $path > $file
cat ${file}.in >> $file
 
chmod +x $file

rm -f xsemi_new_funcs.tcl.*
touch xsemi_new_funcs.tcl.menu1
touch xsemi_new_funcs.tcl.menu2
touch xsemi_new_funcs.tcl.menu3
touch xsemi_new_funcs.tcl.menu4
touch xsemi_new_funcs.tcl.procs
touch xsemi_new_funcs.tcl.names

rm -f xaut_new_funcs.tcl.*
touch xaut_new_funcs.tcl.menu
touch xaut_new_funcs.tcl.procs
touch xaut_new_funcs.tcl.names

chmod a+w xsemi_new_funcs.tcl.menu1 xsemi_new_funcs.tcl.menu2 xsemi_new_funcs.tcl.menu3 xsemi_new_funcs.tcl.menu4 xsemi_new_funcs.tcl.procs xsemi_new_funcs.tcl.names xaut_new_funcs.tcl.menu xaut_new_funcs.tcl.procs xaut_new_funcs.tcl.names

