Bash cURL-通知上载进度

Bash cURL-通知上载进度,bash,file-upload,curl,automation,Bash,File Upload,Curl,Automation,我有Xcode中的脚本,它在归档操作结束时自动运行。它正在签名并将构建提交给TestFlight服务。问题是上传需要很多时间,我看不到任何进展 作为通知程序,它使用apple脚本通知程序: notify () { /usr/bin/osascript -e "display notification \"$1\" with title \"Xcode\"" } notify "Uploading to TestFlight" 卷曲上传在这里完成: /usr/bin/curl "http

我有Xcode中的脚本,它在归档操作结束时自动运行。它正在签名并将构建提交给TestFlight服务。问题是上传需要很多时间,我看不到任何进展

作为通知程序,它使用apple脚本通知程序:

notify () {
    /usr/bin/osascript -e "display notification \"$1\" with title \"Xcode\""
}
notify "Uploading to TestFlight"
卷曲上传在这里完成:

/usr/bin/curl "http://testflightapp.com/api/builds.json" \
-F file=@"/tmp/${PRODUCT_NAME}.ipa" \
-F dsym=@"/tmp/${PRODUCT_NAME}.dSYM.zip" \
-F api_token="${API_TOKEN}" \
-F team_token="${TEAM_TOKEN}" \
-F notes="Build uploaded automatically from Xcode."
如果我能看到关于10、20等的类似信息,我会很高兴。。。上载进程的百分比


下面是完整的脚本:

将输出重定向到某个地方,进度条将显示出来。在您的例子中,它被关闭的原因是您要求curl将下载的数据发送到stdout,然后它会自动关闭进度表,以避免弄乱输出


因此,在shell中使用>重定向,或者使用curl的(小写字母o)或(大写字母o)选项之一。

Mac上的示例:>dev/null可能重复的