mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-28 20:45:47 +00:00
correct symlink creation - make them relative instead of absolute
follow up of f45202acde
This commit is contained in:
parent
f45202acde
commit
5a3c9247d8
@ -803,10 +803,14 @@ deduplicate() {
|
||||
find "$@" -type f -print | while read file ; do
|
||||
echo $(md5 -q "$file") "$file"
|
||||
done | sort | while read hash file ; do
|
||||
if [ "$phash" = "$hash" ]; then
|
||||
ppath=$(dirname "$pfile")
|
||||
path=$(dirname "$file")
|
||||
if [ "$phash" = "$hash" -a "$ppath" = "$path" ]; then
|
||||
pname=$(basename "$pfile")
|
||||
name=$(basename "$file")
|
||||
cmp -s "$pfile" "$file" && (
|
||||
rm "$file"
|
||||
ln -s "$pfile" "$file" && echo link for "$file" created
|
||||
cd "$path" && ln -s "$pname" "$name" && echo link for "$file" created
|
||||
)
|
||||
fi
|
||||
phash="$hash"
|
||||
|
Loading…
Reference in New Issue
Block a user