<div dir="ltr">might not be the best solution, but I just build the spec file dynamically<br>before building the boot script<br><br><font size="1"><span style="font-family: courier new,monospace;">get_vsn(Module) -></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> AppFile = code:lib_dir(Module)++"/ebin/"++atom_to_list(Module)++".app",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> {ok,[{application,_App,Attrs}]} = file:consult(AppFile),</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> {value,{vsn,Vsn}} = lists:keysearch(vsn,1,Attrs),</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> Vsn</span></font><br>
<br>get_vsn(crypto) will then get you the installed version of crypto<br><br>use get_vsn and erlang:system_info(version) to build the spec file, <br>write it, and then call make_script<br><br><div class="gmail_quote">2008/10/14 C. Florian Ebeling <span dir="ltr"><<a href="mailto:florian.ebeling@gmail.com">florian.ebeling@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
we have an application on which two people are working<br>
using defferent kinds of unix/linux distributions (Mac and Suse).<br>
<br>
So they have deferent releases of erlang installed. When<br>
I use this release spec, I get warnings from make_script/2.<br>
<br>
{release, {"adrecord_rel","1.0"}, {erts, "5.6.3"},<br>
[{kernel,"2.12.3"},<br>
{stdlib,"1.15.3"},<br>
{sasl, "<a href="http://2.1.5.3" target="_blank">2.1.5.3</a>"},<br>
{crypto, "1.5.2"},<br>
{adrecord, "0.1"}]}<br>
<br>
which look like this:<br>
<br>
erl -noshell -pa ebin -eval 'systools:make_script("adrecord",<br>
[local])' -s init stop<br>
crypto: No valid version ("1.5.2") of .app file found. Found file<br>
"/opt/local/lib/erlang/lib/crypto-1.5.2.1/ebin/crypto.app" with<br>
version "<a href="http://1.5.2.1" target="_blank">1.5.2.1</a>"<br>
<br>
Is there some elegant way to deal with this? Can I maybe<br>
specify some wildcards or only the more major part of versions?<br>
<br>
Florian<br>
<font color="#888888"><br>
<br>
--<br>
Florian Ebeling<br>
Twitter: febeling<br>
<a href="mailto:florian.ebeling@gmail.com">florian.ebeling@gmail.com</a><br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</font></blockquote></div><br></div>