Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.81 KB | None | 0 0
  1. #!/bin/bash ##This is a script to simply and easily copy DVDs to your hard drive from the command line ##For help send an email to wishingforayer@gmail.com ############################################################################################################################################################ ##################################################### Variable Declaration ############################################################ ############################################################################################################################################################ safemk () { if [ ! -d $1 ]; then mkdir $1; chmod +rw $1; fi } MYHOME=/home/$USER VIDEO=/home/$USER/video/dvds ############################################################################################################################################################ ##################################################### Scripted Action ############################################################ ############################################################################################################################################################ echo -e "Hello" $USER", How are you??" echo -e "Where would you like the ISO created?" OPTIONS="Home User-Specified Video/dvd QUIT" select opt in $OPTIONS; do if [ "$opt" = "Home" ]; then DIRECTORY=$MYHOME elif [ "$opt" = "User-Specified" ]; then echo -e "Please enter the directory into which you would like to create your ISO: " read DIRECTORY elif [ "$opt" = "Video/dvd" ]; then safemk video/dvds DIRECTORY=$VIDEO elif [ "$opt" = "QUIT" ]; then exit 0 else clear echo "That wasn't one of the options." fi break done echo -e "Please enter the desired filename for your ISO: " read "FILENAME" dd if=/dev/cdrom | bar -s $EXPECTED_SIZE | dd of=$DIRECTORY/"$FILENAME".iso eject /dev/cdrom exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement