From 17dab90180cc6bac1ea19b37b9fb2b2aff9542fb Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 29 Jul 2024 21:33:46 -0600 Subject: [PATCH] fix --- debian.sh | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/debian.sh b/debian.sh index 48ceb92..d2d1f9d 100755 --- a/debian.sh +++ b/debian.sh @@ -155,37 +155,21 @@ os-backup() { cryptsetup close $ROOT_MAPPER_NAME } -live-os-userData() { - clear - mkdir /tmp/live - LIVE_OS_DM="/dev/mapper/$(mount | grep -i ' / ' | cut -d '/' -f4 | cut -d ' ' -f1)" - LIVE_OS_SUBVOL="@$(mount | grep -i ' / ' | cut -d '@' -f2 | sed 's/)//g')" - partitions - mount $LIVE_OS_DM /tmp/live - clear - - echo "[Syncing User Data to from $LIVE_OS_DM to $HARD_DISK ]" - echo - userTweaks - chown -R $USER:$USER $TARGET/home/$USER - cd - umount /tmp/live -} - live-os-restore() { clear mkdir /tmp/live LIVE_OS_DM="/dev/mapper/$(mount | grep -i ' / ' | cut -d '/' -f4 | cut -d ' ' -f1)" LIVE_OS_SUBVOL="@$(mount | grep -i ' / ' | cut -d '@' -f2 | sed 's/)//g')" partitions - mount $LIVE_OS_DM /tmp/live - clear + echo "[Transferring Currenting Running OS from $LIVE_OS_DM to $HARD_DISK ]" echo + LIVE_OS_DM="/dev/mapper/$(mount | grep -i ' / ' | cut -d '/' -f4 | cut -d ' ' -f1)" + LIVE_OS_SUBVOL="@$(mount | grep -i ' / ' | cut -d '@' -f2 | sed 's/)//g')" + mount $LIVE_OS_DM /tmp/live cd /tmp/live/$LIVE_OS_SUBVOL rsync -a --delete . --exclude=home/* --exclude=sys/* --exclude=dev/* --exclude=proc/* --exclude=run/* $TARGET/ - fstab cp -f $SCRIPT/debian.sh $TARGET/usr/bin/ systemMounts @@ -193,13 +177,12 @@ live-os-restore() { echo rm -f $TARGET/boot/* rsync -av --delete /boot/ $TARGET/boot/ - chmod +x $TARGET/usr/bin/debian.sh chroot $TARGET /usr/bin/debian.sh bootloader $1 $5 $2 chroot $TARGET /usr/bin/debian.sh btrfs-tweaks chroot $TARGET /usr/bin/debian.sh accounts - read -p 'Would you like to run your UserTweaks? :' -e -i 'y' user_tweaks + if [[ $user_tweaks = *y* ]]; then userTweaks else @@ -754,7 +737,6 @@ tweaks() { echo "[4] Chroot into existing OS" echo "[5] *Danger* Resize /boot and /boot/efi [Run on booted OS only!]" echo "[6] Restore Current Running OS to Another Drive" - echo "[7] Re-sync User data to Live Medium from Step 6" echo read -p 'Your Choice: ' choice if [[ $choice = 1 ]]; then @@ -809,9 +791,6 @@ tweaks() { elif [[ $choice = 6 ]]; then set-devices live-os-restore "$HARD_DISK" $ROOT_MAPPER_NAME "none" "none" "$ROOT_NAME" - elif [[ $choice = 7 ]]; then - set-devices - live-os-userData fi }