8 movesymlinks - Rename file and correct its symlinks to keep point to it.
12 movesymlinks I<OLDNAME> I<NEWNAME> [I<DIR> [I<DIR> [...]]]
14 Rename file I<OLDNAME> to I<NEWNAME> and search I<DIR> directories for symlinks
15 pointing to I<OLDNAME> and change them to point to I<NEWNAME>.
21 if [ $# = 0 -o "$1" = --help ]
39 mv -v -n "$oldname" "$newname"
41 find "$@" -maxdepth 1 -type l
-printf '%f %l\n' |\
42 while IFS
=$
'\t' read -r symlinkfile target
44 if [ "$target" = "$oldname" ]
46 ln -v -snf "$newname" "$symlinkfile"