zoukankan      html  css  js  c++  java
  • 如何在Sierra运行 Specials K 的patch

    https://github.com/ApolloZhu/CORE-Keygen-and-Special-K-for-Sierra-Utility/blob/master/Special%20K%20for%20Sierra%20Utility.sh

    其实就是一个指向路径的问题。。。

     1 #! /bin/bash
     2 
     3 echo "This is an app to use Special [K] patchers on macOS Sierra."
     4 echo " "
     5 echo "This is in NO WAY associated or endorsed by the Special [K] group."
     6 echo " "
     7 
     8 # verify that command line tools are installed
     9 # patching won't work without them
    10 # the patcher will make a corrupt patch if they are installed while patching
    11 
    12 echo "Checking for Command Line tools."
    13 echo "Patching cannot proceed without them."
    14 echo " "
    15 echo "If the tools need to be installed, try patching again when they are done."
    16 echo " "
    17 
    18 check=$(xcode-select --install 2>&1)
    19 
    20 echo "$check" | grep -q "install requested" && echo "Tools need to be installed...Quitting" && exit 1
    21 
    22 echo "Command line tools are already installed."
    23 echo " "
    24 
    25 
    26 # ask user to select the Special [K] patcher
    27 # keep trying until user quits or finds an acceptable patcher
    28 
    29 while true ; do
    30 
    31     get_patcher=$(osascript -e "POSIX path of (choose file with prompt "Choose the Special [K] patcher" of type "APPL" default location (path to applications folder))" 2>&1)
    32 
    33     echo "$get_patcher" | grep -q "User cancelled" && echo "No patcher was chosen...Quitting" && exit 1
    34 
    35     patcher="${get_patcher}Contents/MacOS/patcher"
    36     eyepatch="${get_patcher}Contents/MacOS/eyePatch"
    37 
    38     [[ -e "$patcher" ]] && [[ -e "$eyepatch" ]] && break 
    39 
    40     echo "Does not appear to be a Special [K] patcher, try again..."
    41 done
    42 
    43 
    44 # ask user to select the app to patch
    45 # there is no error checking for whether this is the correct app
    46 # any output is suppressed so as to not confuse the user
    47 # there does not appear to be any message if the app has already been patched
    48 # nor if there is a specific error while patching
    49 
    50 the_app=$(osascript -e "POSIX path of (choose file with prompt "Choose the app to be patched" of type "APPL" default location (path to applications folder))" 2>&1)
    51 
    52 echo "$the_app" | grep -q "User cancelled" && echo "No app was chosen...Quitting" && exit 1
    53 
    54 
    55 # do the patch
    56 # suppress messages that might be confusing, but also might be helpful if problems
    57 
    58 "$patcher" "$the_app" "$eyepatch" "$the_app" 2>&1 > /dev/null
    59 
    60 echo " " && echo "All Done!" && exit 0
  • 相关阅读:
    mysql mysqldump 本地数据库导入本地数据库的命令
    window mysql5.7 zip 安装
    MySQL存储过程详解 mysql 存储过程
    spring batch 读取多个文件数据导入数据库
    spring batch 以游标的方式 数据库读取数据 然后写入目标数据库
    不同浏览器上中文文件名的下载乱码问题
    spring mvc 文件下载 get请求解决中文乱码问题
    SpringMVC上传文件的三种方式
    NSPort
    iOS NSRunloop
  • 原文地址:https://www.cnblogs.com/lei1016cn/p/9667887.html
Copyright © 2011-2022 走看看