Build selected branches

Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
This commit is contained in:
Tyler Nijmeh 2021-11-25 01:30:06 -08:00
parent 942c86a916
commit 1a9c6f4a0c
2 changed files with 18 additions and 6 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
KTweak-MM_*.zip
KTweak-MM*.zip

View File

@ -1,8 +1,20 @@
#!/usr/bin/env bash
TIMESTAMP="$(date +%F_%M-%H-%S)"
HASH="$(git rev-parse HEAD)"
ZIP="KTweak-MM_${TIMESTAMP}_${HASH}.zip"
BRANCHES=(balance budget latency throughput)
rm -f KTweak-MM_*.zip
zip -0 -r -ll "$ZIP" META-INF/ customize.sh module.prop service.sh
rm -rf KTweak-MM*.zip
for branch in ${BRANCHES[@]}
do
echo " * Building $branch..."
TIMESTAMP="$(date +%F_%M-%H-%S)"
HASH="$(git rev-parse HEAD)"
ZIP="KTweak-MM-${branch}_${TIMESTAMP}_${HASH}.zip"
cp customize.sh customize.sh.bk
sed -i "s/BRANCH=\"balance\"/BRANCH=\"$branch\"/" customize.sh
zip -0 -r -ll "$ZIP" META-INF/ customize.sh module.prop service.sh
mv customize.sh.bk customize.sh
echo
done