2017-05-12 20:23:14 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
2018-12-07 23:33:54 +01:00
|
|
|
#set -x
|
2017-05-12 20:23:14 +02:00
|
|
|
|
|
|
|
rm -rf /rocksdb-local
|
|
|
|
cp -r /rocksdb-host /rocksdb-local
|
|
|
|
cd /rocksdb-local
|
2017-10-02 20:06:26 +02:00
|
|
|
|
|
|
|
# Use scl devtoolset if available (i.e. CentOS <7)
|
|
|
|
if hash scl 2>/dev/null; then
|
2018-12-07 23:33:54 +01:00
|
|
|
if scl --list | grep -q 'devtoolset-7'; then
|
|
|
|
scl enable devtoolset-7 'make jclean clean'
|
|
|
|
scl enable devtoolset-7 'PORTABLE=1 make -j6 rocksdbjavastatic'
|
|
|
|
elif scl --list | grep -q 'devtoolset-2'; then
|
|
|
|
scl enable devtoolset-2 'make jclean clean'
|
|
|
|
scl enable devtoolset-2 'PORTABLE=1 make -j6 rocksdbjavastatic'
|
|
|
|
else
|
|
|
|
echo "Could not find devtoolset"
|
|
|
|
exit 1;
|
|
|
|
fi
|
2017-10-02 20:06:26 +02:00
|
|
|
else
|
|
|
|
make jclean clean
|
2018-12-07 23:33:54 +01:00
|
|
|
PORTABLE=1 make -j6 rocksdbjavastatic
|
2017-10-02 20:06:26 +02:00
|
|
|
fi
|
|
|
|
|
2017-05-12 20:23:14 +02:00
|
|
|
cp java/target/librocksdbjni-linux*.so java/target/rocksdbjni-*-linux*.jar /rocksdb-host/java/target
|
|
|
|
|