From a1a9c210435acd440bd7c67aeeb7c5eb22c27151 Mon Sep 17 00:00:00 2001 From: Cuynu Date: Wed, 17 Dec 2025 02:05:54 +0700 Subject: [PATCH] feat: createmodule.sh: commit id after module name Signed-off-by: Cuynu --- createmodule.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/createmodule.sh b/createmodule.sh index 59d1cb8..d44c090 100755 --- a/createmodule.sh +++ b/createmodule.sh @@ -1,15 +1,20 @@ #!/bin/bash + +COMMIT="$(git rev-parse --short HEAD)" + + echo "Creating module (*.zip)..." cd module_new/zdefend-fix -zip -r mbzdefend-fix.zip . >/dev/null 2>&1 +zip -r mbzdefend_fix_$COMMIT.zip . >/dev/null 2>&1 cd .. cd .. -mv module_new/zdefend-fix/mbzdefend-fix.zip mbzdefend-fix.zip +mv module_new/zdefend-fix/mbzdefend_fix_*.zip mbzdefend_fix_$COMMIT.zip -if [ -f mbzdefend-fix.zip ]; then - echo "Module saved to [mbzdefend-fix.zip], try to flash it :>" +if [ -f mbzdefend_fix_*.zip ]; then + echo "Module saved to [mbzdefend_fix_$COMMIT.zip], try to flash it :>" + rm -rf module_new/zdefend-fix/*.zip else - echo "Where is [mbzdefend-fix.zip] ?" + echo "Where is [mbzdefend_fix_$COMMIT.zip] ?" echo "Did module actually created yet... Try fetch repo and use command again!" echo "If your system doesn't have [zip], pls install it" fi