mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-08 00:43:06 +00:00
chore: use temp directory for tarball.
This commit is contained in:
parent
5e8db67378
commit
8ca15bdd70
@ -14,14 +14,6 @@ output_filename=$3
|
|||||||
[[ -z "${rln_version}" ]] && { echo "No rln version specified"; exit 1; }
|
[[ -z "${rln_version}" ]] && { echo "No rln version specified"; exit 1; }
|
||||||
[[ -z "${output_filename}" ]] && { echo "No output filename specified"; exit 1; }
|
[[ -z "${output_filename}" ]] && { echo "No output filename specified"; exit 1; }
|
||||||
|
|
||||||
# Create lock (wait if another process is building)
|
|
||||||
lockfile="${output_filename}.lock"
|
|
||||||
exec 9>"$lockfile"
|
|
||||||
if ! flock -n 9; then
|
|
||||||
echo "Another build process is running, waiting..."
|
|
||||||
flock 9
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get the host triplet
|
# Get the host triplet
|
||||||
host_triplet=$(rustc --version --verbose | awk '/host:/{print $2}')
|
host_triplet=$(rustc --version --verbose | awk '/host:/{print $2}')
|
||||||
|
|
||||||
@ -41,9 +33,10 @@ if curl --silent --fail-with-body -L \
|
|||||||
-o "${tarball}";
|
-o "${tarball}";
|
||||||
then
|
then
|
||||||
echo "Downloaded ${tarball}"
|
echo "Downloaded ${tarball}"
|
||||||
tar -xzf "${tarball}"
|
tmpdir=$(mktemp -d)
|
||||||
mv "release/librln.a" "${output_filename}"
|
tar -xzf "${tarball}" -C "$tmpdir"
|
||||||
rm -rf "${tarball}" release
|
mv "$tmpdir/release/librln.a" "${output_filename}"
|
||||||
|
rm -rf "${tarball}" "$tmpdir"
|
||||||
else
|
else
|
||||||
echo "Failed to download ${tarball}"
|
echo "Failed to download ${tarball}"
|
||||||
# Build rln instead
|
# Build rln instead
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user