This required adding the included script in every project that links to one of the bundled libraries. The script is designed to sleep for a while if another thread is already extracting the libraries. The script uses a temporary file as an extraction step lock, so other instances sleep, and then detect the libraries.updated file, which is created before the lock is removed. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
16 lines
538 B
Bash
Executable file
16 lines
538 B
Bash
Executable file
#!/bin/sh
|
|
|
|
BASEDIR=$(dirname "$0")
|
|
|
|
until [ ! -f "${BASEDIR}/../ThirdParty/libraries.extracting" ]
|
|
do
|
|
sleep 5
|
|
done
|
|
|
|
if [ \( ! -f "${BASEDIR}/../ThirdParty/libraries.updated" \) -o \( "${BASEDIR}/../ThirdParty/libraries.updated" -ot "${BASEDIR}/../ThirdParty/libraries.tar.xz" \) ]; then
|
|
touch "${BASEDIR}/../ThirdParty/libraries.extracting"
|
|
tar -C "${BASEDIR}/../ThirdParty" -xvf "${BASEDIR}/../ThirdParty/libraries.tar.xz"
|
|
touch "${BASEDIR}/../ThirdParty/libraries.updated"
|
|
rm -f "${BASEDIR}/../ThirdParty/libraries.extracting"
|
|
fi
|
|
|