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