如何使用 Install4j 指定 debian 软件包的预安装脚本
我将从 Install4j 生成一个 debian 软件包。在 GUI 中,我们可以指定安装前脚本和安装后脚本。
安装后脚本工作正常,但安装前脚本不起作用,即Install4j 不会在.deb 文件中生成预安装。
我想用于预安装脚本的脚本:
#!/bin/sh echo "reading additionnal repository" IN=${compiler:SOFT_DEPENDENCIES_DEB_32} echo $IN OIFS=$IFS IFS=';' arr2=$IN for repo in $arr2 do nbRepoPresent=$(egrep -c $repo /etc/apt/sources.list) if [ $nbRepoPresent -lt 1 ]; then echo "adding additionnal repository $repo" sudo add-apt-repository "deb $repo" fi done IFS=$OIFS
这是一个错误还是我的代码错误?
I will generate an debian package from Install4j. In the GUI we can specify an pre installation script and a post installation script.
The post installation script work fine, but the pre installation script don't work, i.e Install4j don't generate a preinst in the .deb file.
The script I want to use for pre installation script :
#!/bin/sh echo "reading additionnal repository" IN=${compiler:SOFT_DEPENDENCIES_DEB_32} echo $IN OIFS=$IFS IFS=';' arr2=$IN for repo in $arr2 do nbRepoPresent=$(egrep -c $repo /etc/apt/sources.list) if [ $nbRepoPresent -lt 1 ]; then echo "adding additionnal repository $repo" sudo add-apt-repository "deb $repo" fi done IFS=$OIFS
Is it a bug or my code is wrong ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是当前版本(5.0.9)中的一个错误。它将在 5.0.10 中修复。您可以在此处下载当前版本:
http://download.ej-technologies.com/beta /install4j_windows_5_0_10.exe
http://download.ej-technologies.com/beta/install4j_windows-x64_5_0_10.exe
<一个href="http://download.ej-technologies.com/beta/install4j_unix_5_0_10.tar.gz" rel="nofollow">http://download.ej-technologies.com/beta/install4j_unix_5_0_10.tar.gz
http://download.ej-technologies.com/beta/install4j_macos_5_0_10.dmg
This is a bug in the current version (5.0.9). It will be fixed in 5.0.10. You can download the current build here:
http://download.ej-technologies.com/beta/install4j_windows_5_0_10.exe
http://download.ej-technologies.com/beta/install4j_windows-x64_5_0_10.exe
http://download.ej-technologies.com/beta/install4j_unix_5_0_10.tar.gz
http://download.ej-technologies.com/beta/install4j_macos_5_0_10.dmg