New comment by Chocimier on void-packages repository https://github.com/void-linux/void-packages/pull/21272#issuecomment-622010268 Comment: > I'd rather the hook be used for simple cases, and vlicense whenever anything gets complicated. > So is it too confusing to have two ways to do things? Yes, I think having two ways is too complicated. There will be need to look for license files in two parts of template while reviewing. People are used to call vlicense, so they will be calling it in new templates: should we accept this? Will existing vlicense calls stay? Hook seem to work with sedding, but is it simple case? Below is hook mod that handle globs. It fails if no file is matched by glob. ``` bash # This hook install $license_file hook() { local pair file target cd "$wrksrc" || return 0 for pair in $license_file do file=${pair%:*} if [ "$file" = "$pair" ]; then for i in $file; do vlicense "$i" done else target=${pair#*:} vlicense "$file" "$target" fi done } ```