Automator中的Shell脚本无法正常工作

时间:2014-12-18 15:13:58

标签: macos shell automator

由于this post,我刚刚想出如何将变量传递给Automator中的shell脚本,但现在脚本不起作用,在终端工作正常时。我错过了什么?尝试使用和不使用引号。顺便说一下,脚本用于将音频转换为任何格式,在本例中为m4r铃声格式。

afconvert [original-audio-file] [ringtone-file] -f m4af

以下是automator工作流程的屏幕截图 enter image description here

1 个答案:

答案 0 :(得分:3)

您可能需要告诉shell脚本安装afconvert的位置。因此,在终端中键入:

which afconvert

找到它的位置。然后使用它在脚本中显示的完整路径,如下所示:

/usr/local/bin/afconvert "$1" "$2" -f m4af
echo $1
echo $2