From dd6735285d5adaabd0dbf6e39e938b987b5b6914 Mon Sep 17 00:00:00 2001 From: Hynek Mlnarik Date: Thu, 24 May 2018 15:32:01 +0200 Subject: [PATCH] KEYCLOAK-7438 Don't create symlinks in download-license-files.sh --- .../licenses-common/download-license-files.sh | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/distribution/licenses-common/download-license-files.sh b/distribution/licenses-common/download-license-files.sh index 23ce87fcc2..c15a85edb7 100755 --- a/distribution/licenses-common/download-license-files.sh +++ b/distribution/licenses-common/download-license-files.sh @@ -61,30 +61,4 @@ echo "==> Normalizing license line endings" >&2 find "$output_dir" -maxdepth 1 -type f -name '*.txt' -print0 | xargs --no-run-if-empty -0 dos2unix -echo "==> Symlinking identical files" >&2 - -hashtemp="$(mktemp)" -trap "rm '$hashtemp'" EXIT - -cd "$output_dir" -find -maxdepth 1 -type f -name '*.txt' -print0 | LC_ALL=C sort -z | xargs --no-run-if-empty -0 sha256sum | sed 's, \./,,' > "$hashtemp" - -declare -A processed_hashes - -while IFS=" " read -r -d $'\n' hash filename -do - if ! [ -v processed_hashes["$hash"] ] - then - echo "$filename" >&2 - grep -F "$hash " "$hashtemp" | grep -vxF "$hash $filename" | \ - while IFS=" " read -r -d $'\n' dup_hash dup_filename - do - echo " -> $dup_filename" >&2 - rm "$dup_filename" - ln -s "$filename" "$dup_filename" - done - processed_hashes["$hash"]="$filename" - fi -done < "$hashtemp" - echo "==> Complete" >&2