What is the best way to offer people to install a script plus simple dependencies

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















I have a trivial project which consists of a simple executable script plus a couple of data files.



I'd want to offer a way for users to install this; which would just consist of copying the script to /usr/local/bin/ and the data files to /usr/local/share I guess.
Of course I can provide a Makefile for this but this would introduce a requirement on make. Should I just supply a simple shell script instead for this task?



Also, if possible I would want to make it easy for distro packagers (Fedora, Debian, etc) to create a package. I guess they will not use my install script anyway, would they? Is there any info on how to approach this? The Linux distributions only have info on 'how to package for x' but not 'how to create a software so we can easily package it for x' or am I mistaken?










share|improve this question


























    1















    I have a trivial project which consists of a simple executable script plus a couple of data files.



    I'd want to offer a way for users to install this; which would just consist of copying the script to /usr/local/bin/ and the data files to /usr/local/share I guess.
    Of course I can provide a Makefile for this but this would introduce a requirement on make. Should I just supply a simple shell script instead for this task?



    Also, if possible I would want to make it easy for distro packagers (Fedora, Debian, etc) to create a package. I guess they will not use my install script anyway, would they? Is there any info on how to approach this? The Linux distributions only have info on 'how to package for x' but not 'how to create a software so we can easily package it for x' or am I mistaken?










    share|improve this question
























      1












      1








      1


      0






      I have a trivial project which consists of a simple executable script plus a couple of data files.



      I'd want to offer a way for users to install this; which would just consist of copying the script to /usr/local/bin/ and the data files to /usr/local/share I guess.
      Of course I can provide a Makefile for this but this would introduce a requirement on make. Should I just supply a simple shell script instead for this task?



      Also, if possible I would want to make it easy for distro packagers (Fedora, Debian, etc) to create a package. I guess they will not use my install script anyway, would they? Is there any info on how to approach this? The Linux distributions only have info on 'how to package for x' but not 'how to create a software so we can easily package it for x' or am I mistaken?










      share|improve this question














      I have a trivial project which consists of a simple executable script plus a couple of data files.



      I'd want to offer a way for users to install this; which would just consist of copying the script to /usr/local/bin/ and the data files to /usr/local/share I guess.
      Of course I can provide a Makefile for this but this would introduce a requirement on make. Should I just supply a simple shell script instead for this task?



      Also, if possible I would want to make it easy for distro packagers (Fedora, Debian, etc) to create a package. I guess they will not use my install script anyway, would they? Is there any info on how to approach this? The Linux distributions only have info on 'how to package for x' but not 'how to create a software so we can easily package it for x' or am I mistaken?







      shell-script software-installation






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 10 at 20:51









      MichielBMichielB

      1083




      1083




















          1 Answer
          1






          active

          oldest

          votes


















          2














          One way of making your script easy to install could be to allow it to install itself (with a suitable option)... It’s perhaps unorthodox but it should suit your purposes reasonably well, at least for end users. Do make sure you use a sub-directory of /usr/local/share, not /usr/local/share directly. You might also want to consider allowing installation in a user’s home directory — if your script can work with its data alongside it, that would be the simplest option.



          For packagers, you’re right that a simple package would probably not rely on an installation mechanism you provide: it’s just as easy to tell the packaging system to copy three files to the appropriate place. For packages, you’ll have to ensure that your script can easily handle being installed in /usr/bin and /usr/share/<something> instead of /usr/local/....



          See Debian’s upstream guide for a comprehensive guide describing how to be a package-friendly upstream developer. Most of the recommendations in the guide aren’t Debian-specific. (Most also won’t apply to you in this particular case!)






          share|improve this answer
























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f499818%2fwhat-is-the-best-way-to-offer-people-to-install-a-script-plus-simple-dependencie%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            One way of making your script easy to install could be to allow it to install itself (with a suitable option)... It’s perhaps unorthodox but it should suit your purposes reasonably well, at least for end users. Do make sure you use a sub-directory of /usr/local/share, not /usr/local/share directly. You might also want to consider allowing installation in a user’s home directory — if your script can work with its data alongside it, that would be the simplest option.



            For packagers, you’re right that a simple package would probably not rely on an installation mechanism you provide: it’s just as easy to tell the packaging system to copy three files to the appropriate place. For packages, you’ll have to ensure that your script can easily handle being installed in /usr/bin and /usr/share/<something> instead of /usr/local/....



            See Debian’s upstream guide for a comprehensive guide describing how to be a package-friendly upstream developer. Most of the recommendations in the guide aren’t Debian-specific. (Most also won’t apply to you in this particular case!)






            share|improve this answer





























              2














              One way of making your script easy to install could be to allow it to install itself (with a suitable option)... It’s perhaps unorthodox but it should suit your purposes reasonably well, at least for end users. Do make sure you use a sub-directory of /usr/local/share, not /usr/local/share directly. You might also want to consider allowing installation in a user’s home directory — if your script can work with its data alongside it, that would be the simplest option.



              For packagers, you’re right that a simple package would probably not rely on an installation mechanism you provide: it’s just as easy to tell the packaging system to copy three files to the appropriate place. For packages, you’ll have to ensure that your script can easily handle being installed in /usr/bin and /usr/share/<something> instead of /usr/local/....



              See Debian’s upstream guide for a comprehensive guide describing how to be a package-friendly upstream developer. Most of the recommendations in the guide aren’t Debian-specific. (Most also won’t apply to you in this particular case!)






              share|improve this answer



























                2












                2








                2







                One way of making your script easy to install could be to allow it to install itself (with a suitable option)... It’s perhaps unorthodox but it should suit your purposes reasonably well, at least for end users. Do make sure you use a sub-directory of /usr/local/share, not /usr/local/share directly. You might also want to consider allowing installation in a user’s home directory — if your script can work with its data alongside it, that would be the simplest option.



                For packagers, you’re right that a simple package would probably not rely on an installation mechanism you provide: it’s just as easy to tell the packaging system to copy three files to the appropriate place. For packages, you’ll have to ensure that your script can easily handle being installed in /usr/bin and /usr/share/<something> instead of /usr/local/....



                See Debian’s upstream guide for a comprehensive guide describing how to be a package-friendly upstream developer. Most of the recommendations in the guide aren’t Debian-specific. (Most also won’t apply to you in this particular case!)






                share|improve this answer















                One way of making your script easy to install could be to allow it to install itself (with a suitable option)... It’s perhaps unorthodox but it should suit your purposes reasonably well, at least for end users. Do make sure you use a sub-directory of /usr/local/share, not /usr/local/share directly. You might also want to consider allowing installation in a user’s home directory — if your script can work with its data alongside it, that would be the simplest option.



                For packagers, you’re right that a simple package would probably not rely on an installation mechanism you provide: it’s just as easy to tell the packaging system to copy three files to the appropriate place. For packages, you’ll have to ensure that your script can easily handle being installed in /usr/bin and /usr/share/<something> instead of /usr/local/....



                See Debian’s upstream guide for a comprehensive guide describing how to be a package-friendly upstream developer. Most of the recommendations in the guide aren’t Debian-specific. (Most also won’t apply to you in this particular case!)







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Feb 10 at 22:16

























                answered Feb 10 at 21:30









                Stephen KittStephen Kitt

                174k24399474




                174k24399474



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f499818%2fwhat-is-the-best-way-to-offer-people-to-install-a-script-plus-simple-dependencie%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown






                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay