add lock to build.sh

This commit is contained in:
dembim 2026-01-17 08:09:14 -05:00
parent bc10a9f4d8
commit a251313202
3 changed files with 31 additions and 6 deletions

View file

@ -1,6 +1,14 @@
#! /usr/bin/env nix-shell
#! nix-shell --pure -i bash
#! nix-shell --pure -p nodejs_24 bash harfbuzz soupault woff2 jotdown python3 recode perl538Packages.LaTeXML minify
#! nix-shell --pure -p nodejs_24 bash harfbuzz soupault woff2 jotdown python3 recode perl538Packages.LaTeXML minify flock
LOCKFILE="/tmp/$(basename "$0")87230498650689.lock"
exec 200> "$LOCKFILE"
if ! flock -n 200; then
echo "Error: Another instance of $(basename "$0") is already running."
exit 1
fi
if ! [[ -d pgvv/ ]]; then
python3 -m venv pgvv