script: Simplify repository cloning logic (#283)
Rather than cloning to SukiSU-Ultra and renaming it KernelSU, it would be better to clone it directly as KernelSU. Signed-off-by: Cloud_Yun <1770669041@qq.com>
This commit is contained in:
@@ -39,11 +39,10 @@ perform_cleanup() {
|
|||||||
# Sets up or update KernelSU environment
|
# Sets up or update KernelSU environment
|
||||||
setup_kernelsu() {
|
setup_kernelsu() {
|
||||||
echo "[+] Setting up KernelSU..."
|
echo "[+] Setting up KernelSU..."
|
||||||
# Clone the repository and rename it to KernelSU
|
# Clone the repository
|
||||||
if [ ! -d "$GKI_ROOT/KernelSU" ]; then
|
if [ ! -d "$GKI_ROOT/KernelSU" ]; then
|
||||||
git clone https://github.com/SukiSU-Ultra/SukiSU-Ultra SukiSU-Ultra
|
git clone https://github.com/SukiSU-Ultra/SukiSU-Ultra KernelSU
|
||||||
mv SukiSU-Ultra KernelSU
|
echo "[+] Repository cloned."
|
||||||
echo "[+] Repository cloned and renamed to KernelSU."
|
|
||||||
fi
|
fi
|
||||||
cd "$GKI_ROOT/KernelSU"
|
cd "$GKI_ROOT/KernelSU"
|
||||||
git stash && echo "[-] Stashed current changes."
|
git stash && echo "[-] Stashed current changes."
|
||||||
@@ -77,4 +76,4 @@ elif [ "$1" = "--cleanup" ]; then
|
|||||||
else
|
else
|
||||||
initialize_variables
|
initialize_variables
|
||||||
setup_kernelsu "$@"
|
setup_kernelsu "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user