1 parent 6564e38 commit c292e70Copy full SHA for c292e70
1 file changed
platform/windows/create-license-directory.sh
@@ -32,11 +32,13 @@ get_dependencies ( ) {
32
}
33
34
copy_license_directory ( ) {
35
- if [ -d "/mingw64/share/licenses/${1}" ]; then
+ ORIGINAL_DIRECTORY="$(pacman -Ql ${1}| grep '/licenses/*/$'|cut -f2 -d ' ')"
36
+ ORIGINAL_DIRECTORY="${ORIGINAL_DIRECTORY::-1}"
37
+ if [ -n "${ORIGINAL_DIRECTORY}" ] && [ -d "${ORIGINAL_DIRECTORY}" ]; then
38
if [ ! -d "${LICENSE_DIRECTORY}/${1}" ]; then
39
echo "Adding license for ${1} to ${LICENSE_DIRECTORY}"
40
fi
- cp -rf "/mingw64/share/licenses//${1}" "${LICENSE_DIRECTORY}/"
41
+ cp -rf "${ORIGINAL_DIRECTORY}" "${LICENSE_DIRECTORY}/"
42
for dependency in $(get_dependencies "${1}"); do
43
if [ "${dependency}" == "None" ]; then
44
continue
0 commit comments