mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-08 00:43:06 +00:00
chore: lock rln script
This commit is contained in:
parent
dc040a542d
commit
2f41d5892a
@ -5,6 +5,20 @@
|
||||
|
||||
set -e
|
||||
|
||||
# --- lock setup ---
|
||||
lockdir="build/rln.lock"
|
||||
mkdir -p build
|
||||
|
||||
# try to acquire lock (atomic)
|
||||
while ! mkdir "${lockdir}" 2>/dev/null; do
|
||||
echo "Another process is building RLN, waiting..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# cleanup on exit
|
||||
cleanup() { rm -rf "${lockdir}"; }
|
||||
trap cleanup EXIT
|
||||
|
||||
# first argument is the build directory
|
||||
build_dir=$1
|
||||
rln_version=$2
|
||||
@ -14,6 +28,11 @@ output_filename=$3
|
||||
[[ -z "${rln_version}" ]] && { echo "No rln version specified"; exit 1; }
|
||||
[[ -z "${output_filename}" ]] && { echo "No output filename specified"; exit 1; }
|
||||
|
||||
if [[ -f "${output_filename}" ]]; then
|
||||
echo "RLN library already exists: ${output_filename}, skipping build."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Get the host triplet
|
||||
host_triplet=$(rustc --version --verbose | awk '/host:/{print $2}')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user