14 lines
537 B
Bash
Executable File
14 lines
537 B
Bash
Executable File
#!/bin/sh -ex
|
|
target="${1:-$PWD}"
|
|
cd $DATA/5*
|
|
tar xf Qobuz-commandes.tar
|
|
mv -v *.jpg Qobuz-commandes/
|
|
mv -v Qobuz-commandes $target/qobuz #$d4/music/Worship/
|
|
rm -i Qobuz-commandes.tar
|
|
cd $target/qobuz
|
|
find -type d -exec sh -c 'test $(ls "{}" | wc -l) -eq 1 && find "{}" -maxdepth 1 -type f | xargs -i% mv -v % .' \;
|
|
find -type d -empty -delete
|
|
formatsongs
|
|
find -maxdepth 1 -name "*.jpg" -exec sh -c 'mv -v "{}" "$(echo {} | rev | cut -d"/" -f1 | rev | cut -d"-" -f1-2 | tr -s "-" " " | xargs -i% find -type d -iname "%*")/"' \;
|
|
exec zsh
|