admin管理员组文章数量:1356889
Here is an MWE to create a simple test package with 2 files.
$ cat hello.sh
#!/usr/bin/sh
cat mydatafolder/data.txt
$ cat mydatafolder/data.txt
Hello World!
hello-world-1.0 $ tree -L 1
.
├── debian
├── hello.sh
└── mydatafolder
3 directories, 1 file
Now how do I refer to data.txt so that the same incantation works both while creating the package and after installing it.
Here is what I tried:
hello-world-1.0$ cat debian/install
hello.sh usr/bin
mydatafolder/* usr/share/mydatafolder
hello-world-1.0$ echo $XDG_DATA_DIRS
/usr/share/gnome:/usr/local/share/:/usr/share/
When I create and install the package it says :
$ hello.sh
cat: mydatafolder/data.txt: No such file or directory
Should'nt mydatafolder which is in /usr/share/ be in the list of folders in $XDG_DATA_DIRS ? Is that not how it works?
本文标签: debUsing the XDG standard to refer to files in an installed Debian packageStack Overflow
版权声明:本文标题:deb - Using the XDG standard to refer to files in an installed Debian package - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743954903a2567957.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论