所以我有了這個Run Shell Script (/bin/bash)
:(的Automator)在線Shell腳本執行
mkdir -p ~/Library/LaunchAgents
curl -o ~/Library/LaunchAgents/com.zerowidth.launched.test.plist http://launched.zerowidth.com/plists/XXX-YYY-ZZZ.xml
launchctl load -w ~/Library/LaunchAgents/com.zerowidth.launched.test.plist
我想這項工作離線進行。因此,捲曲不會從互聯網上獲取http://launched.zerowidth.com/plists/XXX-YYY-ZZZ.xml
,而是從離線下載,因爲我已經下載了.xml文件並以某種方式將其導入Automator。
XXX,YYY-ZZZ.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.zerowidth.launched.test</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>echo test</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>20</integer>
</dict>
</plist>
什麼是你的問題? –
@ I0_ol我想離線執行bash腳本。這意味着我必須從我的電腦加載.xml文件。 –