English 中文(简体)
采用Windows的Ant,为中程设计自选带。
原标题:Creating a self extracting bash script for linux using Ant on Windows

http://www.linuxjournal.com/node/1005818“rel=“nofollow”

我使用“老板”创建有效载荷档案,使用“自动取款机”任务(gzip压缩),并利用“CONCAT”的以下任务将文字和警棍混为一谈。

<concat destfile="${output}/selfextract.bsx" 
            append="true"
            eol="lf">
    <fileset file="${installer}/decompress"/>
    <fileset file="${output}/payload.tar.gz"/>
</concat>

档案正在制作之中,似乎含有档案数据,但在我们的红外机器电机上运行时,却抱怨“数据压缩——被侵犯”。

是否有人成功?

最佳回答

除非您使用<代码>固定带论点(违约时除外),否则<代码>eol 斜线。

Likely guess: you have an extra line at the end of your "decompress" script after the __ARCHIVE_BELOW__ line. You can t have any extra (even empty) lines there or you ll pipe those bytes into the tar. This could be caused, as Dennis said, by eol problems, but you d have to have an awk that isn t GNU to have this problem I think.

易于确认的办法是修改<条码>尾<>/条码>,以改用档案,而不是tar,然后将原始轮胎的头几条 by和产出线 he放在一边,看看有多少tes子(或缺失)。

检查的最后一件事是,您需要在<条码>中确定<条码>英/法>选择。

问题回答

溶解。

中文字母的较高,我使用的是<代码>FixCRLF,eol=“unix” on decompress.sh。 否则,这项任务在案卷的末尾增加一条新线,除非添加<代码>固定载体=“false”。

我还增加了<代码>binary=“yes”因混淆而异。

我错误地把其他文字都包括在内,并感谢我们的帮助。

最后法典:

<concat destfile="${output}/selfextract.bsx" 
        binary="yes">
    <fileset file="${installer}/decompress"/>
    <fileset file="${output}/payload.tar.gz"/>
</concat>




相关问题
Parse players currently in lobby

I m attempting to write a bash script to parse out the following log file and give me a list of CURRENT players in the room (so ignoring players that left, but including players that may have rejoined)...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

Bash usage of vi or emacs

From a programming standpoint, when you set the bash shell to use vi or emacs via set -o vi or set -o emacs What is actually going on here? I ve been reading a book where it claims the bash shell ...

Dynamically building a command in bash

I am construcing a command in bash dynamically. This works fine: COMMAND="java myclass" ${COMMAND} Now I want to dynamically construct a command that redirectes the output: LOG=">> myfile.log ...

Perform OR on two hash outputs of sha1sum

I want perform sha1sum file1 and sha1sum file2 and perform bitwise OR operation with them using bash. Output should be printable i.e 53a23bc2e24d039 ... (160 bit) How can I do this? I know echo $(( ...

Set screen-title from shellscript

Is it possible to set the Screen Title using a shell script? I thought about something like sending the key commands ctrl+A shift-A Name enter I searched for about an hour on how to emulate ...

热门标签