feat: createmodule.sh: commit id after module name
Signed-off-by: Cuynu <cuynu@proton.me>
This commit is contained in:
parent
b856debf09
commit
a1a9c21043
1 changed files with 10 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue