summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-05-25 22:54:00 +0300
committerunknown <monty@mysql.com>2004-05-25 22:54:00 +0300
commita9b481d3cd7fbf832b17523c521185db6366492c (patch)
treeb258dbd41e0b45f70adf8c42ee94cce74cd0232f /scripts
parentde5edbf8db66e1f896b76d408152cd0094dcf684 (diff)
parenta3d0ce6bc611673e2d5342bc9cd735a9febfe6b4 (diff)
downloadmariadb-git-a9b481d3cd7fbf832b17523c521185db6366492c.tar.gz
merge with 4.0 to get Netware patches and fixes for libmysqld.dll
configure.in: Auto merged Build-tools/Do-compile: Auto merged client/mysql.cc: Auto merged client/mysqladmin.c: Auto merged client/mysqlcheck.c: Auto merged client/mysqldump.c: Auto merged client/mysqlimport.c: Auto merged client/mysqlshow.c: Auto merged client/mysqltest.c: Auto merged include/my_global.h: Auto merged include/thr_alarm.h: Auto merged innobase/include/trx0roll.h: Auto merged innobase/include/trx0trx.h: Auto merged innobase/que/que0que.c: Auto merged innobase/srv/srv0srv.c: Auto merged innobase/trx/trx0purge.c: Auto merged innobase/trx/trx0roll.c: Auto merged innobase/trx/trx0trx.c: Auto merged innobase/usr/usr0sess.c: Auto merged isam/isamchk.c: Auto merged myisam/myisam_ftdump.c: Auto merged myisam/myisamchk.c: Auto merged myisam/myisampack.c: Auto merged mysys/default.c: Auto merged mysys/my_getopt.c: Auto merged mysys/my_init.c: Auto merged mysys/my_pthread.c: Auto merged netware/Makefile.am: Auto merged netware/init_db.sql: Auto merged scripts/make_binary_distribution.sh: Auto merged tools/mysqlmanager.c: Auto merged VC++Files/dbug/dbug.dsp: Auto merged VC++Files/heap/heap.dsp: Auto merged VC++Files/isam/isam.dsp: Auto merged VC++Files/libmysql/libmysql.dsp: Auto merged VC++Files/myisam/myisam.dsp: Auto merged VC++Files/myisammrg/myisammrg.dsp: Auto merged VC++Files/mysys/mysys.dsp: Auto merged VC++Files/libmysqld/libmysqld.dsp: merge client/mysqlbinlog.cc: merge extra/perror.c: merge include/mysql_com.h: merge libmysqld/Makefile.am: merge netware/BUILD/mwenv: merge sql/mysqld.cc: merge
Diffstat (limited to 'scripts')
-rw-r--r--scripts/make_binary_distribution.sh77
-rw-r--r--scripts/mysqlhotcopy.sh20
2 files changed, 71 insertions, 26 deletions
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index da83e195943..230a62c5f11 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -87,8 +87,8 @@ do
fi
done
-for i in COPYING README Docs/INSTALL-BINARY \
- MySQLEULA.txt LICENSE.doc README.NW
+for i in COPYING COPYING.LIB README Docs/INSTALL-BINARY \
+ MySQLEULA.txt LICENSE.doc README.NW
do
if [ -f $i ]
then
@@ -153,6 +153,7 @@ done
if [ $BASE_SYSTEM = "netware" ] ; then
$CP -r netware/*.pl $BASE/scripts
+ $CP scripts/mysqlhotcopy $BASE/scripts/mysqlhotcopy.pl
fi
for i in \
@@ -169,7 +170,7 @@ do
fi
done
-# convert the libs to .lib for NetWare
+# convert the .a to .lib for NetWare
if [ $BASE_SYSTEM = "netware" ] ; then
for i in $BASE/lib/*.a
do
@@ -238,6 +239,16 @@ fi
rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh $BASE/bin/mysql_install_db $BASE/bin/make_binary_distribution $BASE/bin/setsomevars $BASE/support-files/Makefile* $BASE/support-files/*.sh
+
+#
+# Remove system dependent files
+#
+if [ $BASE_SYSTEM = "netware" ] ; then
+ rm -f $BASE/MySQLEULA.txt
+else
+ rm -f $BASE/README.NW
+fi
+
# Make safe_mysqld a symlink to mysqld_safe for backwards portability
# To be removed in MySQL 4.1
(cd $BASE/bin ; ln -s mysqld_safe safe_mysqld )
@@ -311,29 +322,47 @@ which_1 ()
exit 1
}
-#
-# Create the result tar file
-#
+if [ $BASE_SYSTEM != "netware" ] ; then
-tar=`which_1 gnutar gtar`
-if test "$?" = "1" -o "$tar" = ""
-then
- tar=tar
-fi
+ #
+ # Create the result tar file
+ #
+
+ tar=`which_1 gnutar gtar`
+ if test "$?" = "1" -o "$tar" = ""
+ then
+ tar=tar
+ fi
+
+ echo "Using $tar to create archive"
+ cd $TMP
+
+ OPT=cvf
+ if [ x$SILENT = x1 ] ; then
+ OPT=cf
+ fi
+
+ $tar $OPT $SOURCE/$NEW_NAME.tar $NEW_NAME
+ cd $SOURCE
+ echo "Compressing archive"
+ rm -f $NEW_NAME.tar.gz
+ gzip -9 $NEW_NAME.tar
+ echo "Removing temporary directory"
+ rm -r -f $BASE
+
+ echo "$NEW_NAME.tar.gz created"
+else
-echo "Using $tar to create archive"
-cd $TMP
+ #
+ # Create a zip file for NetWare users
+ #
-OPT=cvf
-if [ x$SILENT = x1 ] ; then
- OPT=cf
-fi
+ cd $TMP
+ if test -e "$SOURCE/$NEW_NAME.zip"; then rm $SOURCE/$NEW_NAME.zip; fi
+ zip -r $SOURCE/$NEW_NAME.zip $NEW_NAME
+ echo "Removing temporary directory"
+ rm -r -f $BASE
-$tar $OPT $SOURCE/$NEW_NAME.tar $NEW_NAME
-cd $SOURCE
-echo "Compressing archive"
-gzip -9 $NEW_NAME.tar
-echo "Removing temporary directory"
-rm -r -f $BASE
+ echo "$NEW_NAME.zip created"
-echo "$NEW_NAME.tar.gz created"
+fi
diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh
index ab06215c3ac..6388855eaa6 100644
--- a/scripts/mysqlhotcopy.sh
+++ b/scripts/mysqlhotcopy.sh
@@ -7,6 +7,7 @@ use File::Basename;
use File::Path;
use DBI;
use Sys::Hostname;
+use File::Copy;
=head1 NAME
@@ -230,6 +231,10 @@ elsif (defined($tgt_name) && ($tgt_name =~ m:/: || $tgt_name eq '.')) {
elsif ( $opt{suffix} ) {
print "Using copy suffix '$opt{suffix}'\n" unless $opt{quiet};
}
+elsif ( ($^O =~ m/^(NetWare)$/) && defined($tgt_name) && ($tgt_name =~ m:\\: || $tgt_name eq '.'))
+{
+ $tgt_dirname = $tgt_name;
+}
else
{
$tgt_name="" if (!defined($tgt_name));
@@ -421,8 +426,11 @@ foreach my $rdb ( @db_desc ) {
else {
mkdir($tgt_dirpath, 0750) or die "Can't create '$tgt_dirpath': $!\n"
unless -d $tgt_dirpath;
+ if ($^O !~ m/^(NetWare)$/)
+ {
my @f_info= stat "$datadir/$rdb->{src}";
chown $f_info[4], $f_info[5], $tgt_dirpath;
+ }
}
}
}
@@ -578,7 +586,15 @@ sub copy_files {
my @cmd;
print "Copying ".@$files." files...\n" unless $opt{quiet};
- if ($method =~ /^s?cp\b/) { # cp or scp with optional flags
+ if ($^O =~ m/^(NetWare)$/) # on NetWare call PERL copy (slower)
+ {
+ foreach my $file ( @$files )
+ {
+ copy($file, $target."/".basename($file));
+ }
+ }
+ elsif ($method =~ /^s?cp\b/) # cp or scp with optional flags
+ {
my $cp = $method;
# add option to preserve mod time etc of copied files
# not critical, but nice to have
@@ -717,7 +733,7 @@ sub retire_directory {
if ( -d $tgt_oldpath ) {
print "Deleting previous 'old' hotcopy directory ('$tgt_oldpath')\n" unless $opt{quiet};
- rmtree([$tgt_oldpath])
+ rmtree([$tgt_oldpath],0,1);
}
rename($dir, $tgt_oldpath)
or die "Can't rename $dir=>$tgt_oldpath: $!\n";