Merge branch 'rpm_unpack' into develop

This commit is contained in:
Markus Makela 2014-10-01 15:10:20 +03:00
commit a5d569ea7e
2 changed files with 36 additions and 0 deletions

4
README
View File

@ -59,6 +59,10 @@ to the --relocate option.
rpm -i --force --relocate=/usr/=$PREFIX/usr/ MariaDB-5.5.34-centos6-x86_64-common.rpm MariaDB-5.5.34-centos6-x86_64-compat.rpm MariaDB-5.5.34-centos6-x86_64-devel.rpm
You can also use the included 'unpack_rpm.sh' script to unpack the RPMs without installing them.
./unpack_rpm <location of MariaDB RPMs> <extraction destination>
This README assumes $PREFIX = $HOME.
MaxScale may be built with the embedded MariaDB library either linked

32
unpack_rmp.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/sh
#This script unpacks the RPM to the provided directory
unpack_to(){
cd $2 && rpm2cpio $1 | cpio -id;
}
if [[ $# -lt 2 ]]
then
echo "Usage: unpack_rpm.sh <path to MariaDB RPMs> <installation directory>"
exit 0
fi
SOURCE=$1
DEST=$2
FILES=$(ls $SOURCE |grep -i mariadb.*`uname -m`.*.rpm)
if [[ ! -d $DEST ]]
then
mkdir -p $DEST
fi
echo "Unpacking RPMs to: $DEST"
for rpm in $FILES
do
echo "Unpacking $rpm..."
unpack_to $SOURCE/$rpm $DEST
done