diff options
author | Alexey Neyman <stilor@att.net> | 2018-11-12 01:15:58 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2018-11-12 01:19:04 -0800 |
commit | 35bec76b6371057746ac11ac25cffab75b8641db (patch) | |
tree | efaf5f9dce421caff012ccf99af3978bacbb3c0d /scripts/functions | |
parent | fad46ac9d1504a90590cf585a700656e1b58e513 (diff) | |
download | crosstool-ng-35bec76b6371057746ac11ac25cffab75b8641db.tar.gz crosstool-ng-35bec76b6371057746ac11ac25cffab75b8641db.tar.bz2 crosstool-ng-35bec76b6371057746ac11ac25cffab75b8641db.zip |
Fix installation of the license file
... for ct-ng configured without --enable-local. Also, install
licenses in subdirectories of the components.
Also, ct-ng configured with --enable-local removed the scripts directory
upon `ct-ng distclean`.
Also, misspelled CT_WGET/CT_CURL variables prevented use of
`ct-ng updatetools`.
Fixes #1091.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/scripts/functions b/scripts/functions index 491c7595..7150b5ba 100644 --- a/scripts/functions +++ b/scripts/functions @@ -2402,27 +2402,21 @@ fi CT_InstallCopyingInformation() { - local pkgname - local pkgdir local licfile local dstdir CT_DoLog EXTRA "Collect license information from: ${CT_SRC_DIR}" CT_DoLog EXTRA "Put the license information to: ${CT_PREFIX_DIR}/share/licenses" - shopt -s nullglob - - for pkgdir in ${CT_SRC_DIR}/*; do - pkgname=$(basename "${pkgdir}") - for licfile in ${pkgdir}/{COPYING*,LICENSE*}; do - dstdir="${CT_PREFIX_DIR}/share/licenses/${pkgname}" - mkdir -p "${dstdir}" - CT_DoExecLog ALL cp -av "${licfile}" "${dstdir}/" - done + for licfile in $( find "${CT_SRC_DIR}" -follow -type f -a \( -name "COPYING*" -o -name "LICENSE*" \) ); do + dstdir="${licfile%/*}" + dstdir="${CT_PREFIX_DIR}/share/licenses${dstdir#${CT_SRC_DIR}}" + mkdir -p "${dstdir}" + CT_DoExecLog ALL cp -av "${licfile}" "${dstdir}/" done # Also add crosstool's information - for licfile in ${CT_TOP_DIR}/{COPYING*,LICENSE*,licenses.d}; do + for licfile in ${CT_LIB_DIR}/{COPYING*,LICENSE*,licenses.d}; do dstdir="${CT_PREFIX_DIR}/share/licenses/crosstool-ng" mkdir -p "${dstdir}" CT_DoExecLog ALL cp -av "${licfile}" "${dstdir}/" |