How to unzip files in a Heroku Buildpack

家住魔仙堡 提交于 2019-12-06 01:44:37

问题


I'm writing a custom Heroku buildpack (heroku-buildpack-fantom) for Fantom, and as part of the compile script I've downloaded a .zip file (from a language vendor), but how do I unzip it?

unzip is not a recognised command.

gunzip exists but I can't use it to unzip .zip files.

What am I missing?


回答1:


Even though (by default) Linux does not come pre-installed with unzip, the Heroku dyno does have a jar command. So the following works okay:

  > jar xf wotever.zip



回答2:


Be sure to run the 'file' command on it. I got a .zip file from SourceForge that was actually bzip2 encoded and Heroku has both the bunzip2 decoder and the -j (--bzip2) option on tar to handle it.



来源:https://stackoverflow.com/questions/16599128/how-to-unzip-files-in-a-heroku-buildpack

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!