Update of /cvsroot/kick/kick
In directory usw-pr-cvs1:/tmp/cvs-serv1760
Modified Files:
install.pl
Log Message:
Bestehende Konfigurationsdateien werden nicht überschrieben
Index: install.pl
===================================================================
RCS file: /cvsroot/kick/kick/install.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** install.pl 19 Mar 2002 09:07:55 -0000 1.2
--- install.pl 29 Apr 2002 22:06:00 -0000 1.3
***************
*** 72,76 ****
print `perl std driver = ODBC`;
! print `perl std database = Microsoft Access Driver (*.mdb);dbq=kick.mdb`;
print `perl std autocommit = `;
print `perl std user = `;
--- 72,76 ----
print `perl std driver = ODBC`;
! print `perl std database = driver=Microsoft Access Driver (*.mdb);dbq=kick.mdb`;
print `perl std autocommit = `;
print `perl std user = `;
***************
*** 81,84 ****
--- 81,87 ----
CopyFile ("init.masql", "init.sql");
}
+ else {
+ print "Datenbank existiert bereits.\n";
+ }
}
elsif ($db =~ /mysql/i) {
***************
*** 98,121 ****
my ($source, $target) = @_;
! open (SOURCE, "< $source") || return 0;
! open (TARGET, "> $target") || return 0;
! if (!(-T $source)) {
! binmode (SOURCE);
! binmode (TARGET);
! while (<SOURCE>) {
! print TARGET $_;
}
- }
- else {
- my $data = join "", <SOURCE>;
- $data =~ s/^\#\!\/perl\/bin\/perl/\#\!$perl/;
- print TARGET $data;
- }
! close (SOURCE);
! close (TARGET);
! return 1;
}
--- 101,131 ----
my ($source, $target) = @_;
! my ($filename) = $target =~ /.*\/(.+)/;
! if (($filename =~ /^\./) && (-e $target)) {
! print "Konfigurationsdatei $target existiert bereits.\n";
! return 1;
! }
! else {
! open (SOURCE, "< $source") || return 0;
! open (TARGET, "> $target") || return 0;
! if (!(-T $source)) {
! binmode (SOURCE);
! binmode (TARGET);
! while (<SOURCE>) {
! print TARGET $_;
! }
! }
! else {
! my $data = join "", <SOURCE>;
! $data =~ s/^\#\!\/perl\/bin\/perl/\#\!$perl/;
! print TARGET $data;
}
! close (SOURCE);
! close (TARGET);
! return 1;
! }
}
|