Quelques outils utiles pour gérer ma bibliothèque musicale
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
354 B

  1. #!/bin/bash
  2. printf "%s" "${NAUTILUS_SCRIPT_SELECTED_FILE_PATHS}" |
  3. while read -r file_to_convert; do
  4. if [[ "$(file -b "${file_to_convert}")" =~ ^"JPEG " ]]; then
  5. /usr/bin/convert "${file_to_convert}" -resize "500x500!" folder.jpg
  6. if [[ "$(basename "${file_to_convert}")" != "folder.jpg" ]]; then
  7. rm "${file_to_convert}"
  8. fi
  9. fi
  10. done