From a68fe245d9514787cd0ab5a52ebd038de65f885c Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Tue, 3 Apr 2018 12:56:09 +0200 Subject: [PATCH] Updated to latest usptream commit --- copy-jdk-configs.spec | 5 ++++- copy_jdk_configs_fixFiles.sh | 13 +++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/copy-jdk-configs.spec b/copy-jdk-configs.spec index c6466dd..680b0d9 100644 --- a/copy-jdk-configs.spec +++ b/copy-jdk-configs.spec @@ -8,7 +8,7 @@ Name: copy-jdk-configs # hash relevant to version tag %global htag f1cd4541f89ac601873ee16d6aa3b3cb1497f0d5 Version: 3.3 -Release: 2%{?dist} +Release: 4%{?dist} Summary: JDKs configuration files copier License: BSD @@ -72,6 +72,9 @@ rm "%{rpm_state_dir}/%{file}" 2> /dev/null || : %license LICENSE %changelog +* Wed Oct 18 2017 Jiri Vanek - 3.3-4 +- fixed rhbz#1541838 + * Wed Oct 18 2017 Jiri Vanek - 3.3-2 - added another subdirs for policies files diff --git a/copy_jdk_configs_fixFiles.sh b/copy_jdk_configs_fixFiles.sh index 767e2c3..054bac3 100755 --- a/copy_jdk_configs_fixFiles.sh +++ b/copy_jdk_configs_fixFiles.sh @@ -63,6 +63,15 @@ listLinks(){ find $1 -type l -print0 | xargs -0 ls -ld | sed "s;.* $1;$1;" | sed "s; \+;_;g" } +printIfExists(){ + if [ -e $ffileCandidate ] ; then + echo $1 + else + # stdout can be captured, therefore stderr + debug "skipping not-existing link-target-dir $1" 1>&2 + fi +} + createListOfLinksTargetsDirectories(){ pushd $source >/dev/null 2>&1 local links=`listLinks $1` @@ -73,9 +82,9 @@ createListOfLinksTargetsDirectories(){ if [ "$ffileCandidate" != "${ffileCandidate#/}" ] ; then if [ -d $ffileCandidate ] ; then # should we accept the links to directories themselves? - echo $ffileCandidate + printIfExists $ffileCandidate else - dirname $ffileCandidate + printIfExists `dirname $ffileCandidate` fi fi done | sort | uniq