LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Situation/condition in spec file for RPM (https://www.linuxquestions.org/questions/linux-software-2/situation-condition-in-spec-file-for-rpm-544422/)

Ameii83 04-08-2007 10:26 PM

Situation/condition in spec file for RPM
 
I 'm trying to build my own rpm. In the spec file, can we state a condition like if/else.For example, if the installation find some files. it will stop the installation.

if(Found some file)
stop

else
continue the installation

it is possible to do that ??

lordtweety 04-09-2007 02:46 AM

You should be able to add any shell commands to the specfile. The rpmbuild script will run any shell commands you put in there, including your if/else statement.

Ameii83 04-12-2007 12:06 AM

the "if/else" is not shell command...it is right?? ..i'm very confuse
can you give me simple example or point me a right tutorial about this??


All times are GMT -5. The time now is 08:42 PM.