I am generating a .jar file with a mvn clean install
command. This jar file contains a sh script that is supposed to be moved to /tmp and then used to generate images from pdf files.
EDIT : The file is not really moved. It's created in my /tmp from the .jar.
The .jar file is generated from windows but used from a redhat linux production server.
Sometimes, the script won't work because its header seems incorrect in hexadecimal (using vim and typing :%!xxd
).
In the correct version of my script, the first line looks like this :
0000000: 2321 2f62 696e 2f62 6173 680a 5044 4654 #!/bin/bash.PDFT
In the incorrect version, you can see this :
0000000: 2321 2f62 696e 2f62 6173 680d 0a50 4446 #!/bin/bash..PDF
And without hexadecimal, the beginning of the file looks like this (obvisously) :
#!/bin/bash
PDFTOPPM=pdftoppm
CONVERT=convert
LOG=/tmp/pdf2imgSh.log
Has anyone ever encountered this problem ? How can I force my maven install (on windows) to correctly generate the jar without broken header in scripts ?
The problem is a bit obscure to me, so don't hesitate to ask for edits or precisions.
Thanks in advance.