I have more then 15 different scripts - bash, perl etc ( I run the scripts on Red Hat Linux)

I want to pack all scripts by RPM. How to do that?

For example I want to do

 rpm -Uvh all_scripts_pack

and then to get all script under /root/New_DIR (the rpm need also to create the New_DIRdirectory)


rpms should never touch user's home directories; place the scripts in /usr/sbin instead.

Put all the scripts in a tarball then use one of the many rpm creation guides to construct the spec file.


I fear it will be impossible to actually answer this question fully. There is however a lot of documentation out there on this subject.

To begin with, I'd suggest taking a look at https://fedoraproject.org/wiki/A_Short_RPM_Tutorial Its an very quick guide that helps you build an rpm for a "hello world" binary. Its slightly more complicated than you need, what with the make's & make installs but I'm hoping you can remove the steps you don't need and modify the rest accordingly.

If I find an example for packaging bash scripts I'll edit my answer but surprisingly I haven't found one yet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.