#! /bin/bash # Les paquets suivant doivent être installés : # apt-get install lsdvd dvdbackup genisoimage gddrescue # Installer aussi la libdvdcss2 # Auteur: Golgot200 set -e set -u attente_retour() { read -p "Taper retour pour continuer" } trap attente_retour EXIT ERR # Nom par le volume ID title=$(isoinfo -d -i /dev/sr0 | grep "Volume id:" | awk '{print $3}') BS=$(isoinfo -d -i /dev/sr0 | grep "^Logical block size is:" | awk '{print $5}') if ! [ -e "$HOME/tmp" ]; then mkdir -m 0700 "$HOME/tmp" fi tmpdir="$(mktemp -d $title-XXXXXXXXXX -p $HOME/tmp)" # Création De l'ISO Protégé Avec Son Nom ddrescue -n -b $BS /dev/sr0 $tmpdir/$title.iso # Rippage De La Structure DVD En Cassant CSS Dans Le dossier (ici DVD-ISOS) dvdbackup -p -M -i $tmpdir/$title.iso -o $tmpdir ## Suppression des Espaces et Renommer Tout En Majuscules cd $tmpdir && rename 'y/[a-z ]/[A-Z_]/' * # Création de L'image ISO Sans CSS genisoimage -dvd-video -o $tmpdir/clean_$title.iso $tmpdir/$title/