![](https://seccdn.libravatar.org/avatar/de2fb12b695661d40dbf9f57ab937099.jpg?s=120&d=mm&r=g)
Dear all java packagers, I'm having an issue with creating a start script from within my spec file. The following line should be written to a shell script java -jar %{_datadir}/%{name}/%{name}.jar `${@}` to start the program, which works fine, except for the command line options. In the shell script the line looks like this: java -jar %{_datadir}/%{name}/%{name}.jar ` ` which doesn't help. I tried several exclamation marks, but none gave me the " $@ " in the created script. any help is much appreciated. Denny -- To unsubscribe, e-mail: opensuse-java+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-java+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/3a766c4a0b64a5d1b06b4a786d5e3a9e.jpg?s=120&d=mm&r=g)
On Monday 01 of November 2010 09:52:22 Denny Beyer wrote:
Dear all java packagers,
I'm having an issue with creating a start script from within my spec file.
The following line should be written to a shell script
java -jar %{_datadir}/%{name}/%{name}.jar `${@}`
to start the program, which works fine, except for the command line options. In the shell script the line looks like this:
java -jar %{_datadir}/%{name}/%{name}.jar ` `
which doesn't help. I tried several exclamation marks, but none gave me the " $@ " in the created script.
any help is much appreciated.
Hi Danny, Here Documents [1] can suppress the variable and command expansion, so the cat <<'EOF' > %{buildroot}/%{_bindir}/%{name} #!/bin/bash java -jar %{_datadir}/%{name}/%{name}.jar `${@}` EOF There are few examples, how to write the script - jedit.spec [2], which comfors to the jpackage.org standards, or the example in Java packaging guidelines [3]. [1] http://tldp.org/LDP/abs/html/here-docs.html [2] https://build.opensuse.org/package/view_file?file=jedit.spec&package=jedit&project=openSUSE%3AFactory&srcmd5=a8cda978f0fa857b3c826cd6a4b85e87 [3] http://en.opensuse.org/openSUSE:Packaging_Java Regards Michal Vyskocil
Denny
participants (2)
-
Denny Beyer
-
Michal Vyskocil