dot

packages and services management
Log | Files | Refs | README

commit aaa5d424362da2bb82b9bd7493db2f7d537ec1c2
parent ab736ab490ac64e759296b83f521fcf381f6ad47
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri, 23 Feb 2018 12:09:06 +0100

mv-groupdir: use hard links

Diffstat:
Mbin/mv-groupdir | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/bin/mv-groupdir b/bin/mv-groupdir @@ -4,14 +4,16 @@ # Group all common sub-subdirectories. This changes all subdirectories # into "d". It is useful to group multi-artist albums together: -# ./artis1/album1 -> d/album1 -# ./artis2/album1 -> d/album1 -# ./artis3/album1 -> d/album1 -# ./artis4/album2 -> d/album2 -# ./artis5/album2 -> d/album2 +# ./artis1/album1/* -> d/album1/* +# ./artis2/album1/* -> d/album1/* +# ./artis3/album1/* -> d/album1/* +# ./artis4/album2/* -> d/album2/* +# ./artis5/album2/* -> d/album2/* mkdir d for dir in */* do - mkdir -p "d/${dir#*/}"; ln -s "$dir"/* "d/${dir#*/}"; done + mkdir -p "d/${dir#*/}" + ln "$dir"/* "d/${dir#*/}" +done