bash - linux architecture environment variable or definition? -
I am creating my RPM files. Now I am writing a bash script that will keep these RPMs in the auto repository structure. :
  distribution / arch / rpm    example:    openSUSE13.1 / i586 / product -0.1.0 -0.i586.rpm    I have found that in the  / etc / os-release  file I can get the name of my delivery etc.; But not my architecture, how can I get the architecture of my computer? I know that I can finally parse it by the name RPM (which looks like this:  product-0.1.0-0.i586.rpm ) but possibly describing my computer architecture Is there some file that will give me  i586  easily?    Edit  In my production of RPM, there are i586 architectures in their name. I       < I>  thanks for jord I get this line in the file  / usr / lib / rpm / rpmrc    
:    buildarchtranslate: i686: i586    So clearly it is rpmbuild which is my "uname -m" architecture i686 Translates to i586. So theoretically it would be possible to use uname -m and look for a translation in the rpmrc file, but it would be very difficult. Parsing the name of  less  rpm which was the most effective way to obtain architecture, the macro or variable can not be defined which matches one produced by RPMBield ( Because the translation is included in the step)   
 
  
 
Comments
Post a Comment