functions: add_file: use the source file name if the destination ends with a slash
functions: add_file: use the source file name if the destination ends with a slash
If the destination ends with a slash, then the source's file name is
kept, but this is not visible in the verbose output.
Use ${dest/%\//\/${src##*/}}
in both messages so that the file name is
correctly displayed.
Use add_dir
to create the directory since install
will not create
the last component of the path.
test/cases/functions.bats: add more add_file tests
- add_file regular file
- add_file with mode
- add_file target is a directory
Edited by nl6720