Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)

share|improve this question

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.

share|improve this answer

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 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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .