~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to storage/ndb/test/run-test/atrt-gather-result.sh

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
 
4
#
 
5
# This program is free software; you can redistribute it and/or modify
 
6
# it under the terms of the GNU General Public License as published by
 
7
# the Free Software Foundation; version 2 of the License.
 
8
#
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
# GNU General Public License for more details.
 
13
#
 
14
# You should have received a copy of the GNU General Public License
 
15
# along with this program; if not, write to the Free Software
 
16
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
17
 
 
18
set -e
 
19
 
 
20
mkdir -p result
 
21
cd result
 
22
rm -rf *
 
23
 
 
24
if [ `uname | grep -ic cygwin || true` -ne 0 ]
 
25
then
 
26
  while [ $# -gt 0 ]
 
27
  do
 
28
    SAVE_IFS=$IFS
 
29
    IFS=":"
 
30
    declare -a ARR="($1)"
 
31
    IFS=$SAVE_IFS
 
32
    DIR=`dirname "${ARR[1]}"`
 
33
    REMOTE_DIR=`cygpath -u $DIR`
 
34
    HOST="${ARR[0]}"
 
35
    rsync -a --exclude='BACKUP' --exclude='ndb_*_fs' "$HOST:$REMOTE_DIR" .
 
36
    shift
 
37
  done
 
38
else
 
39
  while [ $# -gt 0 ]
 
40
  do
 
41
    rsync -a --exclude='BACKUP' --exclude='ndb_*_fs' "$1" .
 
42
    shift
 
43
  done
 
44
 
 
45
  #
 
46
  # clean tables...not to make results too large
 
47
  #
 
48
  lst=`find . -name '*.frm'`
 
49
  if [ "$lst" ]
 
50
  then
 
51
          basename=`echo $i | sed 's!\.frm!!'`
 
52
          if [ "$basename" ]
 
53
          then
 
54
            rm -f $basename.*
 
55
          fi
 
56
  fi
 
57
 
 
58
fi