How to execute shell script in RPM spec file?
<p>I have an RPM which includes to place files on the target machine. How can write shell script in such a way that if file already exists do not copy it.</p>

<p>Description:</p>

<p>When the RPM gets install it should not replace the file, if the file already exists in the location. Currently, it is changing the configuration as it is replacing. I am planning to write a conditional in the %install script section. I tried and it is not working, throwing error like "else"/"fi" not found.</p>