Add locks in android-build.sh scripts
This commit is contained in:
parent
6388eaf433
commit
c2e15be908
2
vendor/boost/Boost-for-Android
vendored
2
vendor/boost/Boost-for-Android
vendored
@ -1 +1 @@
|
|||||||
Subproject commit c6012c576e30ff6000ddab0988d59bad849200ce
|
Subproject commit 83ba7174dea6e0595085dc30051eb17747e7260a
|
14
vendor/boost/android-build.sh
vendored
14
vendor/boost/android-build.sh
vendored
@ -1,19 +1,25 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ $(find build/$2/lib -name libboost_*.a 2>/dev/null |wc -l) -eq 10 ]; then
|
if [ $(find build/$2/lib -name libboost_*.a 2>/dev/null |wc -l) -eq 10 ]; then
|
||||||
echo "boost already built for $2";
|
echo "boost already built for $2";
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p build && rm -rf build/$2 && cd Boost-for-Android || exit 1
|
exec 9>/var/tmp/libcryfs-boost.lock
|
||||||
|
flock 9
|
||||||
|
|
||||||
|
mkdir -p build && rm -rf build/$2 && cd Boost-for-Android
|
||||||
|
|
||||||
BOOST_TAR=boost_1_77_0.tar.bz2
|
BOOST_TAR=boost_1_77_0.tar.bz2
|
||||||
if [ ! -f $BOOST_TAR ]; then
|
if [ ! -f $BOOST_TAR ]; then
|
||||||
wget -O $BOOST_TAR https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2 || exit 1
|
wget -O $BOOST_TAR https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2
|
||||||
fi
|
fi
|
||||||
|
sha256sum -c ../checksum.txt
|
||||||
|
|
||||||
sha256sum -c ../checksum.txt && \
|
|
||||||
./build-android.sh --boost=1.77.0 --arch=$2 --target-version=21 \
|
./build-android.sh --boost=1.77.0 --arch=$2 --target-version=21 \
|
||||||
--with-libraries=atomic,chrono,container,date_time,exception,filesystem,serialization,system,thread \
|
--with-libraries=atomic,chrono,container,date_time,exception,filesystem,serialization,system,thread \
|
||||||
$1 && \
|
$1
|
||||||
|
|
||||||
mv build/out/$2 ../build
|
mv build/out/$2 ../build
|
||||||
|
17
vendor/cryptopp/android-build.sh
vendored
17
vendor/cryptopp/android-build.sh
vendored
@ -1,14 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ -f "vendor_cryptopp/build/$2/libcryptopp.a" ]; then
|
if [ -f "vendor_cryptopp/build/$2/libcryptopp.a" ]; then
|
||||||
echo "Crypto++ already built for $2";
|
echo "Crypto++ already built for $2";
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export ANDROID_NDK_ROOT=$1 && \
|
exec 9>/var/tmp/libcryfs-cryptopp.lock
|
||||||
cd vendor_cryptopp && \
|
flock 9
|
||||||
make clean && \
|
|
||||||
mkdir -p build/$2 && \
|
export ANDROID_NDK_ROOT=$1
|
||||||
source TestScripts/setenv-android.sh 21 $2 && \
|
cd vendor_cryptopp
|
||||||
make -f GNUmakefile-cross static && \
|
make clean
|
||||||
|
mkdir -p build/$2
|
||||||
|
source TestScripts/setenv-android.sh 21 $2
|
||||||
|
make -f GNUmakefile-cross static
|
||||||
mv libcryptopp.a build/$2
|
mv libcryptopp.a build/$2
|
||||||
|
Loading…
Reference in New Issue
Block a user