On Mon, Oct 11, 2010 at 2:16 PM, Nezmer <[email protected]> wrote: > "/etc" was hardcoded in some scripts and manpages. Change this to > respect sysconfdir > > Signed-off-by: Nezmer <[email protected]> > --- > contrib/Makefile.am | 10 ++++++++++ > contrib/bacman | 12 ++++++------ > contrib/pacscripts | 2 +- > contrib/pactree | 6 +++--- > contrib/wget-xdelta.sh | 4 ++-- > contrib/zsh_completion | 6 +++--- > doc/Makefile.am | 8 ++++++++ > doc/makepkg.8.txt | 2 +- > doc/pacman.conf.5.txt | 4 ++-- > scripts/rankmirrors.sh.in | 2 +- > 10 files changed, 37 insertions(+), 19 deletions(-) > > diff --git a/contrib/Makefile.am b/contrib/Makefile.am > index c6243b1..cb2ffc7 100644 > --- a/contrib/Makefile.am > +++ b/contrib/Makefile.am > @@ -12,4 +12,14 @@ EXTRA_DIST = \ > zsh_completion \ > README > > +edit = sed -e 's|@sysconfd...@]|$(sysconfdir)|g' > + > +# Use sysconfdir > +$(EXTRA_DIST): Makefile > + cp -a $@ [email protected] # To reserve permissions in tmp files > + $(edit) $@ >[email protected] || true > + mv [email protected] $@ > + > +all-am: $(EXTRA_DIST) > +
Unfortunately, none of this works quite as expected unless I am missing something. 1) You will immediately mark files as dirty to git and 2) there is no more @sysconfdir@ once this runs once, making it not all that useful. The first step to these patches will be to do to contrib/ what was done to scripts/ way back when, and move them to extensions such as .sh.in and then have the final result in a bare .sh file. -Dan
