添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams
  tell application "AppleScript Editor"
    display dialog "Enter the Folder Name. It must be on your Desktop" default answer ""
    set debID to text returned of the result
end tell
do shell script "cd ~/Desktop"
do shell script "dpkg-deb -b " & debID

Please tell me how to fix the error, thanks

Now I am getting error "dpkg-deb: failed to open package info file `com.test/DEBIAN/control' for reading: No such file or directory" number 2 – BosssDesign Jun 21, 2014 at 8:58 OK - I see the second problem - your cd does not persist between calls to do shell - answer updated to fix this. – Paul R Jun 21, 2014 at 9:31 Now getting dpkg-deb (subprocess): failed to exec tar -cf: No such file or directory dpkg-deb: subprocess tar -cf returned error exit status 2" number 2 – BosssDesign Jun 21, 2014 at 9:36 OK - at this point you should probably debug the shell stuff separately, in Terminal, then when you've ironed out the problems with paths etc you can try getting it to work in AppleScript. – Paul R Jun 21, 2014 at 9:39 The command works fine in terminal, except there cannot be a space between ~/Desktop/debID – BosssDesign Jun 21, 2014 at 9:45

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.