如何在输出 .tar.gz 文件中创建符号链接?

发布于 2024-08-15 06:54:29 字数 178 浏览 5 评论 0原文

我们使用 Windows 作为开发系统,并使用 Ant 来创建特定于平台的捆绑包。对于 macOS 特定包(.tar.gz 文件),我们使用 tar 任务。我想在输出 .tar.gz 文件中创建一个符号链接,该链接指向同一 .tar.gz 文件中的另一个文件。这可以使用 Ant 来完成吗?

We are using Windows as a development system and Ant to create the platform-specific bundles. For the macOS specific bundle (.tar.gz file) we are using the tar task. I want to create a symbolic link in the output .tar.gz file which points to another file in the same .tar.gz file. Can this be done using Ant?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

美男兮 2024-08-22 06:54:29

据我所知,Ant 无法做到这一点。

To the best of my knowledge stock Ant can't do this.

肩上的翅膀 2024-08-22 06:54:29

虽然有点晚了,但建议:您可以使用 cygwin 从 Windows 命令行创建包含符号链接的 tar 存档。

$ ln -s abc def
$ tar cf test.tar abc def
$ tar tvf test.tar
-rw-r--r-- shegny/Domain Users 0 2013-04-26 10:25 abc
lrwxrwxrwx shegny/Domain Users 0 2013-04-26 10:25 def -> abc

Bit late, but suggestion: you can create tar archives containing symlinks from windows command line using cygwin.

$ ln -s abc def
$ tar cf test.tar abc def
$ tar tvf test.tar
-rw-r--r-- shegny/Domain Users 0 2013-04-26 10:25 abc
lrwxrwxrwx shegny/Domain Users 0 2013-04-26 10:25 def -> abc
时光清浅 2024-08-22 06:54:29

您无法在 Windows 上创建符号链接。因此,Symlink Ant 任务将无法正常工作。一种选择是在 Mac 计算机上运行连续构建服务器。然后,您可以定期运行该任务,Symlink Ant 任务就会工作。

You cannot create a symbolic link on Windows. Therefore, the Symlink Ant task would not work properly. One option would be to run a continuous build server on a Mac machine. Then, you could run that task at regular intervals and the Symlink Ant task would work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文