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

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

 #! /bin/bash

 echo "This is an app to use Special [K] patchers on macOS Sierra."
echo " "
echo "This is in NO WAY associated or endorsed by the Special [K] group."
echo " " # verify that command line tools are installed
# patching won't work without them
# the patcher will make a corrupt patch if they are installed while patching echo "Checking for Command Line tools."
echo "Patching cannot proceed without them."
echo " "
echo "If the tools need to be installed, try patching again when they are done."
echo " " check=$(xcode-select --install >&) echo "$check" | grep -q "install requested" && echo "Tools need to be installed...Quitting" && exit echo "Command line tools are already installed."
echo " " # ask user to select the Special [K] patcher
# keep trying until user quits or finds an acceptable patcher while true ; do 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))" >&) echo "$get_patcher" | grep -q "User cancelled" && echo "No patcher was chosen...Quitting" && exit patcher="${get_patcher}Contents/MacOS/patcher"
eyepatch="${get_patcher}Contents/MacOS/eyePatch" [[ -e "$patcher" ]] && [[ -e "$eyepatch" ]] && break echo "Does not appear to be a Special [K] patcher, try again..."
done # ask user to select the app to patch
# there is no error checking for whether this is the correct app
# any output is suppressed so as to not confuse the user
# there does not appear to be any message if the app has already been patched
# nor if there is a specific error while patching 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))" >&) echo "$the_app" | grep -q "User cancelled" && echo "No app was chosen...Quitting" && exit # do the patch
# suppress messages that might be confusing, but also might be helpful if problems "$patcher" "$the_app" "$eyepatch" "$the_app" >& > /dev/null echo " " && echo "All Done!" && exit

最新文章

  1. C语言 Linux内核链表(企业级链表)
  2. bootstrap table简洁扁平的表格
  3. 慕课网-安卓工程师初养成-1-5 使用Eclipse开发Java程序
  4. 10891 - Game of Sum
  5. 如果Android和C#在一起?
  6. 不一样的编码风格--Lambda表达式
  7. zabbix监控Elasticsearch集群
  8. airdrop-ng/aircrack-ng
  9. SQL Server 2017 安装过程中的一点说明(有点意思)
  10. 【一天一道LeetCode】#205. Isomorphic Strings
  11. python的统一编码规范
  12. 微软XAML Studio - WPF, Sliverlight, Xamarin, UWP等技术开发者的福音
  13. Jump跳板机的搭建和部署
  14. siteServer创建网站中Mysql和SqlServer的区别
  15. 在mybatis中调用存储过程的时候,不能加工语句
  16. [转]PostgreSQL命令行使用手册
  17. 字符串格式化:f-strings
  18. sklearn.learning_curve
  19. 20171104xlVBA进退比较
  20. TrinityCore 魔兽世界私服11159 完整配置

热门文章

  1. MySQL之创、增、删、改、查
  2. 《精通Spring4.X企业应用开发实战》读后感第五章(Bean作用域)
  3. 微信小程序开发之下拉菜单
  4. js中“||”和“&&”的高级用法
  5. 封装类似thinkphp连贯操作数据库的Db类(简单版)。
  6. 3dmax视频
  7. mui框架使用心得
  8. JAVA编写的断点续传小程序
  9. IntelliJ IDEA 安装golang 插件
  10. Codecraft-17 and Codeforces Round #391 (Div. 1 + Div. 2, combined) C