diff options
author | Alexey Neyman <stilor@att.net> | 2018-11-12 20:47:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-12 20:47:08 (GMT) |
commit | 710c8e0d8e2f77ec594160af6739b66f2755b855 (patch) | |
tree | efaf5f9dce421caff012ccf99af3978bacbb3c0d /scripts | |
parent | fad46ac9d1504a90590cf585a700656e1b58e513 (diff) | |
parent | 35bec76b6371057746ac11ac25cffab75b8641db (diff) |
Merge pull request #1094 from stilor/license-install-fixes
Fix installation of the license file
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/functions | 18 | ||||
-rw-r--r-- | scripts/scripts.mk | 8 |
2 files changed, 10 insertions, 16 deletions
diff --git a/scripts/functions b/scripts/functions index 491c759..7150b5b 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}/" diff --git a/scripts/scripts.mk b/scripts/scripts.mk index d77f1a7..eeb8a50 100644 --- a/scripts/scripts.mk +++ b/scripts/scripts.mk @@ -31,11 +31,11 @@ ifneq ($(strip $(V)),2) curl_silent_opt = --silent endif -ifneq ($(CT_wget),) -download_cmd = $(CT_wget) --passive-ftp $(wget_silent_opt) -O $@ +ifneq ($(CT_WGET),) +download_cmd = $(CT_WGET) --passive-ftp $(wget_silent_opt) -O $@ else -ifneq ($(CT_curl),) -download_cmd = $(CT_curl) --ftp-pasv $(curl_silent_opt) -o $@ +ifneq ($(CT_CURL),) +download_cmd = $(CT_CURL) --ftp-pasv $(curl_silent_opt) -o $@ else download_cmd = $(error wget or curl needed for downloads) endif |