use Cwd qw(abs_path getcwd);
$path = abs_path(dirname($exe));
chop($java=`which java`);
$jarfile_name = "xml-casa-assembly-1.69.jar";
$jarfile = "$path/java/$jarfile_name";
if ( ! -e $jarfile ) { $jarfile = "$path/../target/scala-2.12/$jarfile_name" }
die "configuration error, cannot find jar file ($jarfile_name)" unless -e $jarfile;
m|^-markdown$| && (push(@flags,$_),$doing_something=1,next);
m|^-upgrade$| && (push(@flags,$_),$doing_something=1,next);
m|^-header$| && (push(@flags,$_),$doing_something=1,next);
m|^-swig$| && (push(@flags,$_),$doing_something=1,next);
m|^-tool$| && (push(@flags,$_),$doing_something=1,next);
m|^-task$| && (push(@flags,$_),$doing_something=1,next);
m|^-gotask$| && (push(@flags,$_),$doing_something=1,next);
m|^-all$| && (push(@flags,$_),$doing_something=1,next);
m|^-tgts$| && (push(@flags,$_),$doing_something=1,next);
m|^-output-tool-subdir$| && (push(@flags,$_),next);
m|^-help$| && (usage(), exit(0));
m|^gotask-imp-module=(.*)$| && (push(@flags,$_),next);
m|\.xml$| && -f && (push(@inputs,$_),next);
if ( m|^outdir=(.*)$| ) {
if ( -d $1 ) { push(@flags,$_) }
else { die "in '$_' directory does not exist" }
if ( m|^output-h=(.*)$| ) {
if ( -d $1 ) { push(@flags,$_) }
else { die "in '$_' directory does not exist" }
if ( m|^output-i=(.*)$| ) {
if ( -d $1 ) { push(@flags,$_) }
else { die "in '$_' directory does not exist" }
if ( m|^output-c=(.*)$| ) {
if ( -d $1 ) { push(@flags,$_) }
else { die "in '$_' directory does not exist" }
if ( m|^output-tool=(.*)$| ) {
if ( -d $1 ) { push(@flags,$_) }
else { die "in '$_' directory does not exist" }
if ( m|^output-task=(.*)$| ) {