#
#   The preinst method handles anything that has to be worked out
#   on a per component basis prior to installation.

/^var target / {
         target = $3
        }

/^var srcdir / {
         srcdir = $3
        }

/^var cmddir / {
         cmddir = $3
        }

/^name / {
    name = $2
}

#   Command tag syntax:  command <filename> <generator>

/^command / {
    print "commandchk " $2
}

#  Prescript is the name of a shell script that needs to run
#  and prompt prior to installation.

#  dir / source here

/^dir / {
   destdir = target "/" $2
}

#  Prescript tag syntax: prescript <name> <filename> <arg1> <arg2>

/^prescript / {
    print $2 " " destdir " " $3 " " $4
}

{
    next
}
