[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: etiquette of sharing executable files

On 7/6/19 12:34 PM, mick crane wrote:
As per recent post ( don't want to trash somebody's home directory ) I was wondering what is the etiquette of sharing executable files. I've never really thought about giving executable files to anybody but just recently while I'm getting my bits of code to work I was thinking "I have to be a bit careful what I put here because I might delete something I'd be unhappy about. And then hmmm, if I did give this to somebody else if they didn't know what did what they might trash they're home directory. I decided to follow the advice and not delete anything and I don't need to need to renumber now. And I decided to go through everything and put in error checking as much as able.
So the question is about the etiquette.
Install scripts could make directories willy nilly in user home directory but you might think that could be rude ? And what happens if by mischance there already exists a directory with the same name ? I think the way would be to make a tar file with the wanted subdirectories and the executable that doesn't touch anything except the directories in the directory it is untarred within.
seems with
use File::Basename;
use Cwd ;
you can check if the basename is equal to the directory it's supposed to be in and die if not. Now I just need to make the executable not writeable and have the several variables in a text file that I get in some fashion. Do those things seem like sensible considerations for exchanging executables ?

I suggest that you create a Perl distribution using h2xs(1):


The end result of this process is a *.tar.gz file, which you can give to people and they can use as follows:

    # extract distribution tarball
    # change working directory into distribution tree root
    $ perl Makefile.PL
    $ make
    $ make test
    $ make install

Once installed, your Perl modules and/or scripts are available to the user.

Optionally, you can upload your Perl distribution to CPAN. This will make the distribution available to anyone with an Internet connection:


Also optionally, you can put your Perl distribution into a Debian package (I am not familiar with how to submit Debian packages to the Debian project for inclusion in Debian):



Reply to: