1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/bash
# Created by Roel Van de Paar, Percona LLC
# This script quickly gathers all ldd dep files for mysqld in the current directory into the current directory
if [ ! -r ./mysqld -a ! -r ./xtrabackup ]; then
echo "Something is wrong: ./mysqld nor ./xtrabackup exist?"
exit 1
fi
if [ -r ./mysqld ]; then
ldd mysqld | sed 's|(.*||;s|=>[ \t]*$||;s|.*=>||;s|[ \t\n\r]*||;s|[^0-9a-zA-Z]$||' | grep -v "^[a-zA-Z]" | xargs -I_ cp _ .
fi
if [ -r ./xtrabackup ]; then
ldd xtrabackup | sed 's|(.*||;s|=>[ \t]*$||;s|.*=>||;s|[ \t\n\r]*||;s|[^0-9a-zA-Z]$||' | grep -v "^[a-zA-Z]" | xargs -I_ cp _ .
fi
|