Ai
1 Star 0 Fork 0

AbnerPei/AP_CodeSnippets_OC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install.sh 801 Bytes
一键复制 编辑 原始数据 按行查看 历史
AbnerPei 提交于 2021-10-04 11:50 +08:00 . 新增sh
#!/usr/make
WORKSPACE=$(cd "$(dirname "$0")";pwd)
local_github_codesnippets_path="$WORKSPACE/CodeSnippets"
echo "是否导入/替换CodeSnippets(y/n):\c"
read -n1 res
small=$(echo $res | tr 'A-Z' 'a-z')
if [[ $small = "y" ]]; then
echo "\n"
#Xcode中的CodeSnippets的路径
xcode_codesnipets_path=~/Library/Developer/Xcode/UserData/CodeSnippets
#删除旧模板
rm -fr "$xcode_codesnipets_path"
#复制文件
cp -r "$local_github_codesnippets_path" "$xcode_codesnipets_path"
#$? 上个命令的退出状态,或函数的返回值。
if [ $? -eq 0 ]; then
echo "😄 代码块已复制到~/Library/Developer/UserData/CodeSnippets\n"
else
echo "😔 ⚠️ 😔 失败了\n"
fi
else
echo "请注意:您已取消!\n"
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Objective-C
1
https://gitee.com/abnerpei/ap_code_snippets_oc.git
git@gitee.com:abnerpei/ap_code_snippets_oc.git
abnerpei
ap_code_snippets_oc
AP_CodeSnippets_OC
master

搜索帮助