kernel: Support switch branch or tag (#382)

This commit is contained in:
セリカ・シルフィル
2023-04-13 14:40:56 +08:00
committed by GitHub
parent 17d6f1cdf1
commit 2f67d24ec9
9 changed files with 119 additions and 3 deletions

View File

@@ -18,7 +18,11 @@ fi
test -d "$GKI_ROOT/KernelSU" || git clone https://github.com/tiann/KernelSU
cd "$GKI_ROOT/KernelSU"
git stash && git pull
git checkout "$(git describe --abbrev=0 --tags)"
if [ ! "$1" ]; then
git checkout "$(git describe --abbrev=0 --tags)"
else
git checkout "$1"
fi
cd "$GKI_ROOT"
echo "[+] GKI_ROOT: $GKI_ROOT"