mirror of
https://git.proxmox.com/git/mirror_linux-firmware
synced 2025-05-29 19:31:21 +00:00
Create symlinks for all firmware that is duplicate using rdfind
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
This commit is contained in:
parent
6c09731441
commit
3e79f6b83b
@ -9,12 +9,16 @@ prune=no
|
|||||||
# shellcheck disable=SC2209
|
# shellcheck disable=SC2209
|
||||||
compress=cat
|
compress=cat
|
||||||
compext=
|
compext=
|
||||||
|
quiet=">/dev/null"
|
||||||
|
rdfind_results=/dev/null
|
||||||
|
|
||||||
while test $# -gt 0; do
|
while test $# -gt 0; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-v | --verbose)
|
-v | --verbose)
|
||||||
# shellcheck disable=SC2209
|
# shellcheck disable=SC2209
|
||||||
verbose=echo
|
verbose=echo
|
||||||
|
quiet=
|
||||||
|
rdfind_results=results.txt
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -115,6 +119,12 @@ grep -E '^Link:' WHENCE | sed -e 's/^Link: *//g;s/-> //g' | while read f d; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
$verbose rdfind -makesymlinks true "$destdir" -outputname $rdfind_results "$quiet"
|
||||||
|
find "$destdir" -type l | while read -r l; do
|
||||||
|
target="$(realpath "$l")"
|
||||||
|
ln -fs "$(realpath --relative-to="$(dirname "$(realpath -s "$l")")" "$target")" "$l"
|
||||||
|
done
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
# vim: et sw=4 sts=4 ts=4
|
# vim: et sw=4 sts=4 ts=4
|
||||||
|
Loading…
Reference in New Issue
Block a user