Ensure only one instance is running

This commit is contained in:
Sayantan Santra 2022-10-11 22:52:34 -05:00
parent fba95e03ef
commit 22c9b6e6ed

View file

@ -1,6 +1,7 @@
#!/bin/bash
# Use force to run the builds forcefully
# Run only one instance of this script at one time
[ "${BKLOCKER}" != "running" ] && exec env BKLOCKER="running" flock -en "/tmp/revanced-builder.lock" "$0" "$@" || :
# Get timestamp
timestamp=$(date '+%s')