From 3a8732282337d8c96669f66d368593ef60f45af3 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Fri, 7 Jan 2011 23:56:38 +0100 Subject: [PATCH] force the linking --- misc/tools/cached-converter.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/tools/cached-converter.sh b/misc/tools/cached-converter.sh index 06433d08..d50348fc 100755 --- a/misc/tools/cached-converter.sh +++ b/misc/tools/cached-converter.sh @@ -76,14 +76,14 @@ cached() tempfile1="${name1%/*}/new-${name1##*/}" [ -z "$outfile2" ] || tempfile2="${name2%/*}/new-${name2##*/}" if [ -f "$name1" ] && { [ -z "$outfile2" ] || [ -f "$name2" ]; }; then - case "$outfile1" in */*) mkdir -p "${outfile1%/*}"; esac && { ln "$name1" "$outfile1" 2>/dev/null || cp "$name1" "$outfile1"; } - [ -z "$outfile2" ] || { case "$outfile2" in */*) mkdir -p "${outfile2%/*}"; esac && { ln "$name2" "$outfile2" 2>/dev/null || cp "$name2" "$outfile2"; }; } + case "$outfile1" in */*) mkdir -p "${outfile1%/*}"; esac && { ln -f "$name1" "$outfile1" 2>/dev/null || cp "$name1" "$outfile1"; } + [ -z "$outfile2" ] || { case "$outfile2" in */*) mkdir -p "${outfile2%/*}"; esac && { ln -f "$name2" "$outfile2" 2>/dev/null || cp "$name2" "$outfile2"; }; } conv=true elif "$method" "$infile1" "$infile2" "$tempfile1" "$tempfile2" "$@"; then mv "$tempfile1" "$name1" [ -z "$outfile2" ] || mv "$tempfile2" "$name2" - case "$outfile1" in */*) mkdir -p "${outfile1%/*}"; esac && { ln "$name1" "$outfile1" 2>/dev/null || cp "$name1" "$outfile1"; } - [ -z "$outfile2" ] || { case "$outfile2" in */*) mkdir -p "${outfile2%/*}"; esac && { ln "$name2" "$outfile2" 2>/dev/null || cp "$name2" "$outfile2"; }; } + case "$outfile1" in */*) mkdir -p "${outfile1%/*}"; esac && { ln -f "$name1" "$outfile1" 2>/dev/null || cp "$name1" "$outfile1"; } + [ -z "$outfile2" ] || { case "$outfile2" in */*) mkdir -p "${outfile2%/*}"; esac && { ln -f "$name2" "$outfile2" 2>/dev/null || cp "$name2" "$outfile2"; }; } conv=true else rm -f "$tempfile1" -- 2.39.2