Re: Install /usr/bin/something from upstream source to /usr/bin/something on hdd?
Andrey Rahmatullin:
>> For the following make snippet, I need a replacement not using rsync.
>>
>> install:
>> rsync \
>> -C \
>> --verbose \
>> --recursive \
>> --links \
>> --perms \
>> --times \
>> --exclude Makefile \
>> --exclude man-helper.bsh \
>> --exclude man \
>> --exclude debian \
>> --exclude t \
>> --exclude .gitignore \
>> --exclude .gitattributes \
>> --exclude COPYING \
>> --exclude GPLv3 \
>> --exclude build \
>> --exclude clean \
>> --exclude CONTRIBUTING.md \
>> $(CURDIR)/ \
>> $(DESTDIR)/
>>
>> Ideally without inventing a big new shell script. Any idea?
> A set of mkdir, cp and/or install commands.
I like to make it generic, so I don't have to list individual files in
the Makefile. That causes less overhead for packaging if file names are
changed/added/etc. (They probably won't be changed a lot, but I am going
to package lots of shell scripts I've written over two years, so I like
to have a template, that requires little changes.)
Rsync dependency has been removed.
The Makefile for "make install" now calls a small script called
install-helper.bsh, that essentially does:
find \
. \
-not -type d \
-not -path './Makefile' \
... \
-not -path './CONTRIBUTING.md' \
-exec echo "cp --parents '{}' $DESTDIR/" \; \
-exec cp --parents '{}' "$DESTDIR/" \;
Does that sound acceptable?
Reply to: