从shell脚本执行symbolicatecrash [英] Execute symbolicatecrash from shell script

查看:326
本文介绍了从shell脚本执行symbolicatecrash的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从循环多个崩溃日志文件并输出带符号版本的shell脚本中调用symboliccrash,但是它失败并显示一条错误消息,提示找不到命令"

I am trying to call symboliccrash from a shell script that loops through multiple crash log file and outputs symbolicated version, but it is failing with an error message saying "command not found"

但是在命令行中它可以正常工作.

But it works fine in the command line.

symboliccrash CRASH_FILE.crash APP.dSYM > symbolicated.crash

我试图找到symboliccrash的来源,但找不到它

I tried to find the source for symboliccrash but it fails to find it

which -a symboliccrash

Shell脚本代码

#!/usr/bin/bash
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"
i=0

for x in *.crash;
do
        symboliccrash $x MyApp.dSYM > $i.crash
        i=$((i+1))
done

响应

compareUUD.sh: line 7: symboliccrash: command not found

任何想法我该怎么做.

推荐答案

我认为您首先需要执行此命令

I think that you need first of all is execute this command

find /Applications/Xcode.app -name symbolicatecrash -type f

在您的终端上,这将检索symbolicatecrash这样的本地化

on your Terminal, this will retrieve the localization of your symbolicatecrash something like this

/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash

/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash

然后您需要将脚本更新为此代码

then you need to update your script to this code

#!/usr/bin/bash
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"

alias symbolicatecrash='/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash'

i=0

for x in *.crash;
do
        symbolicatecrash $x MyApp.dSYM > $i.crash
        i=$((i+1))
done

并将symbolicatecrash的方向替换为执行find /Applications/Xcode.app -name symbolicatecrash -type f

and replace the direction of symbolicatecrash for the result given by the execution of find /Applications/Xcode.app -name symbolicatecrash -type f

就是这样,用sudo sh执行,我测试了并导致此错误

and that is it,execute with sudo sh, I tested and result in this error

0.crash中没有崩溃报告版本,位于 /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash 行1007.

No crash report version in 0.crash at /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash line 1007.

但是我想这个错误是因为我没有崩溃或dSYM,所以我认为现在可以了,希望对您有帮助

But I asume that this error is because I don't have any crash or dSYM so I think that now is working, I hope this help you

这篇关于从shell脚本执行symbolicatecrash的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆