This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# config | |
username=user | |
backupdir="/media/$username/externalDrive" | |
name=$(date +Backup\ %Y-%m-%d\ %H:%M) | |
partuuid="3e45a3de-01" # find your partition uuid by running blkid | |
# check for root permission | |
if [[ $UID -ne 0 ]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
for dev in /dev/sd?1 | |
do | |
if [[ $(blkid -o value -s TYPE $dev) == "BitLocker" ]] | |
then | |
dev_name=$(basename $dev) | |
mount_path="/media/$SUDO_USER/$dev_name" | |
dislocker_path="/media/bitlocker/$dev_name" | |
mkdir -p $dislocker_path |