From 22c9b6e6ed548f3e1d1eac3c68ec5f7994fcfc77 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Tue, 11 Oct 2022 22:52:34 -0500 Subject: [PATCH] Ensure only one instance is running --- build_revanced.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_revanced.sh b/build_revanced.sh index c0934d5..b454431 100755 --- a/build_revanced.sh +++ b/build_revanced.sh @@ -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')