diff --git a/gentoo.sh b/gentoo.sh index efe4da2..56a9bb2 100644 --- a/gentoo.sh +++ b/gentoo.sh @@ -149,37 +149,7 @@ homeBackup() { osBackup() { umount $TARGET - if [[ $FULL_DISK_ENCRYPTION = *True* ]]; then - printf "$DISK_PASSWORD" | cryptsetup open ${BTRFS} $ROOT_MAPPER_NAME - fi - - if [[ -e "$ROOT_MAPPER_NAME" ]]; then - echo - echo "[Mounting.....]" - echo - mount -o $COMPRESSION $ROOT_MAPPER_NAME $TARGET - - if [[ -e "$TARGET/@$ROOT_NAME/usr/bin/bash" ]]; then - if [ "$1" = "home" ]; then - homeBackup - fi - - osSnapshots "$1" "$2" "$3" - else - echo - echo "Aborting Install, $TARGET/@$ROOT_MAPPER_NAME/usr/bin/bash not found!" - echo - echo - exit 1 - fi - - else - echo - echo "Aborting Install, $ROOT_MAPPER_NAME not found!" - echo - echo - exit 1 - fi + osSnapshots "$1" "$2" ls $TARGET/ umount $TARGET @@ -810,15 +780,8 @@ menu() { clear echo "[Backup OS]" echo - read -p 'Backup Home Directory? : ' -e -i 'n' home_backup - read -p 'OS Backup Directory Location : ' -e -i "/mnt" backup_directory - if [[ $home_backup = *n* ]]; then - setDevices - osBackup "none" "$backup_directory" "$ROOT_NAME" - else - setDevices - osBackup "home" "$backup_directory" "$ROOT_NAME" - fi + read -p 'OS Backup Directory Location : ' -e -i "/tmp" backup_directory + osBackup $backup_directory "$ROOT_NAME" elif [[ $choice = 6 ]]; then clear echo "[Restore from Backup]"