#!/usr/bin/perl 

########## Confixx(R) 3.0 Professional ############
####### Copyright SWsoft, Inc. 2004-2005 ##########
#### http://www.sw-soft.com - info@sw-soft.com ####

use File::Basename;
use strict;

my $runDir = dirname($0);

my $restore = "$runDir/restore.pl";

unless (-x "$restore"){
  die "Con'not find executable '$restore'\n";
}

my ($debug,$clean,$cmd,$arg);

$cmd = $restore;


foreach $arg (@ARGV){

  if ($arg=~/^--?(c|clean)$/i){
	$clean=1;
  }elsif($arg=~/^--?(dbg|debug)$/i){
	$debug=1;
  }

}

unless($clean){
  push @ARGV,'--clean';
}

exec ($restore,@ARGV) or
  die "Couldn't execute '$restore': $!\n";





