Re: Running a command in spec file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dne 29.8.2013 11:17, Miroslav Suchý napsal(a):
On 08/29/2013 10:19 AM, Stanislav Ochotnicky wrote:
%{?scl:scl enable %{scl} "}
# this is a shell
command 1
command 2
...
%{?scl:"}

Just one command with this syntax. If you need more command, you have to use heredoc as Vít said in this thread.


Actually the syntax is correct. However, one advantage of heredoc is that you can use quotes freely, e.g. this does *not* work (unless you escape the double quotes):

%{?scl:scl enable %{scl} "}
# this is a shell
command "1"
command "2"
...
%{?scl:"}


while this is perfectly OK:


%{?scl:scl enable %scl - << \EOF}
# this is a shell
command "1"
command "2"
...
%{?scl:EOF}


In other words, heredoc makes the conversion from regular .spec to SCL .spec a bit easier in some cases.


Vít
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux