#!/bin/sh
clear
run=1
while [ $run -eq 1 ]; do
    echo "  输入 1 引导进入越狱"
    echo "  输入 2 进入首次越狱for 16G"
    echo "  输入 3 进入首次越狱for 32G"
    echo "  输入 4 退出恢复模式"
    echo "  输入 5 清除越狱"
    echo "  输入 6 进入安全模式越狱"
    echo "  输入 7 引导进入无根越狱"
    echo "  按 Ctrl+C 退出"
    read -p "  请输入对应功能的数字:" tmp
    run=0
    if [ $tmp -eq 1 ];then
        echo "# Arguments: -f -V"
        sleep 1
        palera1n -f -V
    elif [ $tmp -eq 2 ];then
        echo "# Arguments: -f -B -V"
        sleep 1
        palera1n -f -B -V
    elif [ $tmp -eq 3 ];then
        echo "# Arguments: -f -c -V"
        sleep 1
        palera1n -f -c -V
    elif [ $tmp -eq 4 ];then
        echo "# Arguments: -n"
        sleep 1
        palera1n -n
    elif [ $tmp -eq 5 ];then
        echo "# Arguments: -f --force-revert"
        sleep 1
        palera1n -f --force-revert
    elif [ $tmp -eq 6 ];then
        echo "# Arguments: -f -s"
        sleep 1
        palera1n -f -s
    elif [ $tmp -eq 7 ];then
        echo "# Arguments: -l -V"
        sleep 1
        palera1n -l -V
    else
        run=1
        clear
    fi
done