mirror of
https://github.com/tytydraco/KTweak.git
synced 2024-11-14 18:12:46 +00:00
7e21801599
Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
27 lines
653 B
Bash
Executable File
27 lines
653 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
BRANCHES=(balance budget latency throughput)
|
|
SCRIPT_PARENT_PATH="system/bin"
|
|
SCRIPT_NAME="ktweak"
|
|
SCRIPT_PATH="$SCRIPT_PARENT_PATH/$SCRIPT_NAME"
|
|
|
|
mkdir -p "$SCRIPT_PARENT_PATH"
|
|
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"
|
|
|
|
echo " * Checking out script..."
|
|
git checkout "$branch" -- "$SCRIPT_NAME"
|
|
|
|
echo " * Patching for Android..."
|
|
sed -i 's|!/usr/bin/env bash|!/system/bin/sh|g' "$SCRIPT_PATH"
|
|
|
|
echo " * Setting executable permissions..."
|
|
chmod +x "$SCRIPT_PATH"
|
|
done
|