From 481e42d32c1436df3b0358ef0df4a167473c422c Mon Sep 17 00:00:00 2001
From: SinTan1729 <sayantan.santra689@gmail.com>
Date: Sat, 1 Jul 2023 22:43:52 -0500
Subject: [PATCH] fix: Properly manager versions on failure

---
 build_revanced.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/build_revanced.sh b/build_revanced.sh
index 698d1e5..3690f57 100755
--- a/build_revanced.sh
+++ b/build_revanced.sh
@@ -92,6 +92,7 @@ check_flag=false
 # Get inside the working directory
 cd "$WDIR"
 echo "$(date) | Starting check..."
+cp verions.json versions.json.old
 
 # Fetch all the dependencies
 try=0
@@ -253,7 +254,8 @@ if [ $error == 1 ]; then
             -d "$MESSAGE" \
             "$NTFY_URL/$NTFY_TOPIC"
     fi
-    mv versions.json versions.json.bk
+    mv versions.json versions.json.fail
+    mv versions.json.old versions.json
     exit 4
 fi