~percona-toolkit-dev/percona-toolkit/turn-off-v-c

« back to all changes in this revision

Viewing changes to bin/pt-sift

  • Committer: Daniel Nichter
  • Date: 2011-12-28 18:40:59 UTC
  • Revision ID: daniel@percona.com-20111228184059-9ocha31n5ytdoqtx
Merge lp:~percona-toolkit-dev/percona-toolkit/pt-align r257..260 (branch was accidently created from pt-table-checksum-2.0 branch instead of 2.0 branch).

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
   fi
52
52
 
53
53
   # If the programs we need don't exist, try to get them.
54
 
   # Aspersa tools:
55
 
   for prog in align; do
56
 
      if which $prog >/dev/null 2>&1 ; then
57
 
         eval "PR_$prog"="$(which $prog)"
58
 
      elif [ -f $prog -a -x $prog ]; then
59
 
         eval "PR_$prog"="./$prog"
60
 
      elif [ -f "${BASEDIR}/$prog" -a -x "${BASEDIR}/$prog" ]; then
61
 
         eval "PR_$prog"="${BASEDIR}/$prog"
62
 
      elif which "curl" >/dev/null 2>&1; then
63
 
         echo "Fetching $prog" >&2
64
 
         curl http://aspersa.googlecode.com/svn/trunk/$prog > "$prog" && chmod +x "$prog"
65
 
         eval "PR_$prog"="./$prog"
66
 
      else
67
 
         echo "Cannot find or fetch required program: $prog" >&2
68
 
         exit 1
69
 
      fi
70
 
   done
71
54
   # Percona Toolkit tools:
72
 
   for prog in pt-diskstats pt-pmp pt-mext; do
 
55
   for prog in pt-diskstats pt-pmp pt-mext pt-align; do
73
56
      # A var can't be named "PR_pt-pmp" so we chop of "pt-" to get
74
57
      # the program's basename, resulting in "PR_pmp".
75
58
      prog_base=${prog#"pt-"}
590
573
=head1 SYSTEM REQUIREMENTS
591
574
 
592
575
This tool requires Bash v3 and the following programs: pt-diskstats, pt-pmp,
593
 
pt-mext, and align (from Aspersa).  If these programs are not in your PATH,
 
576
pt-mext, and pt-align.  If these programs are not in your PATH,
594
577
they will be fetched from the Internet if curl is available.
595
578
 
596
579
=head1 BUGS