Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I wrote a very simple Linux program which is essentially made up of: a bash script, four python scripts and a text file. I want to package it all together so that when people install it, it automatically distributes itself in this fashion:

text file         go to    /  
bash script       go to    /usr/bin/  
python scripts    go to    /usr/bin/.programnamehere/  

I know these aren't the proper places to put things for a proper application, this is just something quick I wrote to familiarize myself with this process.

Now, I could pack all of these files into a archive and add a separate "install" script to move copy everything around and then delete the originals, but I would rather do it via some other method (like apt-get).

I read a bit of the apt-get documentation and I really am not sure if this process is what would happen if I go that route?

If anyone has any suggestions on what I should do or links to something relevant, I would really appreciate it.

share|improve this question
1  
You really shouldn't put anything into /. Depending on its purpose, your text file might fit into /usr/share/doc/yourpackagename. –  n.st Aug 18 '13 at 0:45
1  
If you prefer an apt-get-like installation over an install script, and you are satisfied with your program being installable on Debian/Ubuntu, this might help you: wiki.debian.org/HowToPackageForDebian –  n.st Aug 18 '13 at 0:45
    
@n.st yeah I know it's not really a good idea. The file is something that I need every user on the computer to be able to read and write, I can't find another place in the filesystem where I can do that, because if I give the file full permissions, it's still inside of a directory that doesn't have full permissions, so it doesn't work for lower level users. Do you know another way around this problem? Putting it in / is the only solution I've found so far. –  user Aug 18 '13 at 1:45
    
You might want to consider /usr/share/yourprogramname, or /etc/yourprogramname if it's a config file. Could you tell us what your program actually does and what those files contain, so we can decide where they should be stored? –  n.st Aug 18 '13 at 2:10
1  
So the text file contains the actual guestbook content? It should probably live somewhere in /var/ then. Now, as for the bash script, putting it into /usr/bin/ is okay, but /usr/local/bin/ would be better. The directory for the python scripts doesn't need to (and shouldn't) be hidden, so you might want to use /usr/local/bin/myguestbook/ (without the leading dot) instead. –  n.st Aug 18 '13 at 2:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.