Skip to content

Commit

Permalink
Fix docker-build-linux-centos.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Mattheis committed May 10, 2022
1 parent 2d8a68b commit ac0d46e
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions java/crossbuild/docker-build-linux-centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,25 @@ cd /rocksdb-local-build

# Use scl devtoolset if available
if hash scl 2>/dev/null; then
if scl --list | grep -q 'devtoolset-7'; then
# CentOS 7+
scl enable devtoolset-7 'make clean-not-downloaded'
scl enable devtoolset-7 'PORTABLE=1 make -j2 rocksdbjavastatic'
elif scl --list | grep -q 'devtoolset-2'; then
# CentOS 5 or 6
scl enable devtoolset-2 'make clean-not-downloaded'
scl enable devtoolset-2 'PORTABLE=1 make -j2 rocksdbjavastatic'
else
echo "Could not find devtoolset"
exit 1;
fi
if scl --list | grep -q 'devtoolset-8'; then
# CentOS 6+
scl enable devtoolset-8 'make clean-not-downloaded'
scl enable devtoolset-8 'PORTABLE=1 make -j2 rocksdbjavastatic'
elif scl --list | grep -q 'devtoolset-7'; then
# CentOS 6+
scl enable devtoolset-7 'make clean-not-downloaded'
scl enable devtoolset-7 'PORTABLE=1 make -j2 rocksdbjavastatic'
elif scl --list | grep -q 'devtoolset-2'; then
# CentOS 5 or 6
scl enable devtoolset-2 'make clean-not-downloaded'
scl enable devtoolset-2 'PORTABLE=1 make -j2 rocksdbjavastatic'
else
echo "Could not find devtoolset"
exit 1;
fi
else
make clean-not-downloaded
PORTABLE=1 make -j2 rocksdbjavastatic
make clean-not-downloaded
PORTABLE=1 make -j2 rocksdbjavastatic
fi

cp java/target/librocksdbjni-linux*.so java/target/rocksdbjni-*-linux*.jar java/target/rocksdbjni-*-linux*.jar.sha1 /rocksdb-java-target
Expand Down

0 comments on commit ac0d46e

Please sign in to comment.