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
|
||||
setup_kernelsu() {
|
||||
echo "[+] Setting up KernelSU..."
|
||||
# Clone the repository and rename it to KernelSU
|
||||
# Clone the repository
|
||||
if [ ! -d "$GKI_ROOT/KernelSU" ]; then
|
||||
git clone https://github.com/SukiSU-Ultra/SukiSU-Ultra SukiSU-Ultra
|
||||
mv SukiSU-Ultra KernelSU
|
||||
echo "[+] Repository cloned and renamed to KernelSU."
|
||||
git clone https://github.com/SukiSU-Ultra/SukiSU-Ultra KernelSU
|
||||
echo "[+] Repository cloned."
|
||||
fi
|
||||
cd "$GKI_ROOT/KernelSU"
|
||||
git stash && echo "[-] Stashed current changes."
|
||||
@@ -77,4 +76,4 @@ elif [ "$1" = "--cleanup" ]; then
|
||||
else
|
||||
initialize_variables
|
||||
setup_kernelsu "$@"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user