Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # This script backs up a USB key to a disk image.
- #
- # == Explanation ==
- # The first part sets a number of variables used by the "heavy-lifting"
- # script. More details noted in said script. Basically this lets you
- # create many similar scripts (say, for each of your USB keys) without
- # having to copy and modify all of the work-horse code. Also, when you
- # figure out a better way to make the magic happen, you only have to
- # modify said code in one place, and all of your scripts can use it.
- #
- # The second part is what sucks in and runs the work-horse code.
- #
- # Set volume-specific variables
- sourceName=CHIPMUNK;
- backupName=CHIP_BACKUP;
- diskImage=~/DataFiles/BACKUP/Key_CHIPMUNK_backup.sparseimage;
- # Include core backup script
- if [ -e ~/Scripts/backup_CORE.sh ];
- then source ~/Scripts/backup_CORE.sh;
- else echo "Core backup script could not be found.";
- fi
Add Comment
Please, Sign In to add comment