Yup, I was talking about a CPAN distribution, and installing a shell script (or Python script, or some other non-Perl script) via MakeMaker. I'm wondering a quick-hack solution of adding Makefile parameters/targets like this:

SHELL_EXE_FILES = bin-sh/somescript
PYTHON_EXE_FILES = bin-py/somescript2

$(INST_SCRIPT)/somescript :: bin-sh/somescript ...
    $(NOECHO) $(RM_F) $(INST_SCRIPT)/somescript
    $(CP) bin-sh/somescript $(INST_SCRIPT)/somescript
    $(FIXIN) bin-sh/somescript $(INST_SCRIPT)/somescript
    -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_SCRIPT)/somescript

$(INST_SCRIPT)/somescript2 :: bin-py/somescript2 ...
    $(NOECHO) $(RM_F) $(INST_SCRIPT)/somescript2
    $(CP) bin-py/somescript2 $(INST_SCRIPT)/somescript2
    $(FIXIN) bin-py/somescript2 $(INST_SCRIPT)/somescript2
    -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_SCRIPT)/somescript2

The non-Perl scripts will be installed like Perl scripts, except they won't get a manpage (or they could, if we put a POD either inside the script or somewhere else, inside the script if the language supports something equivalent to Perl's __END__), and in the fixin step the appropriate shebang will be chosen.


In reply to Re^2: Distributing non-Perl script in a Perl distribution? by perlancar
in thread Distributing non-Perl script in a Perl distribution? by perlancar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.