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

Re: namespace conflict != package Conflict?



Sebastian Kuzminsky <seb@highlab.com> writes:

> The cogito /usr/bin/git is a tiny little helper script hardly worth its
> inode, but it's in the upstream package and I dont want to remove it or
> rename it.

As others have asked, why not?  Does anything actually rely on the
script existing by that name?

At any rate, if you're absolutely dead set on keeping it, I suppose
you could divert any preexisting instance of /usr/bin/git to, say,
/usr/bin/git.not-cogito, and then have the script fall back to it when
not called with one of the handful of supported first arguments:

#!/bin/bash -norc
cmd=git-$1-script
if command -v "$cmd" >/dev/null 2>&1; then
    shift
    exec "$cmd" "$@"
else
    exec -a "$0" /usr/bin/git.not-cogito "$@"
fi

(You'd likewise need to divert /usr/share/man/man1/git.1.gz, and
perhaps add a pointer to the diverted manpage in your version.)

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
Finger amu@monk.mit.edu (NOT a valid e-mail address) for more info.



Reply to: