diff --git a/winiso/deploy.fish b/winiso/deploy.fish index 997cce3b..3b8a946f 100755 --- a/winiso/deploy.fish +++ b/winiso/deploy.fish @@ -247,18 +247,14 @@ begin "$bootPath" \ "$dataPath" - - if [ ! -b "$WIN_DISK" ] - chooseDisk WIN_DISK - end - - echo "Proceeding will cause the disk `$WIN_DISK` to be wiped." + chooseDisk winDisk + echo "Proceeding will cause the disk `$winDisk` to be wiped." if ! confirm "Are you sure you want to continue?" "n" exit 1 end - sudo shred -vfzn 0 -s 512 "$WIN_DISK" + sudo shred -vfzn 0 -s 512 "$winDisk" begin printf %s\n \ @@ -285,18 +281,13 @@ begin 7 \ \ w - end | sudo fdisk "$WIN_DISK" + end | sudo fdisk "$winDisk" begin set -l disks - - while true - set disks (string split -n " " (bash -c "echo $WIN_DISK*")) - [ (count $disks) -ge 3 ] && break - end - - set -l bootDisk "$disks[2]" - set -l dataDisk "$disks[3]" + set -l diskPath (find -L /dev/disk/by-diskseq -samefile $winDisk) + set -l bootDisk "$diskPath-part1" + set -l dataDisk "$diskPath-part2" sudo mkfs.fat -F 32 -n "BOOT" "$bootDisk" sudo mkfs.ntfs -fFL "$setupLabel" "$dataDisk" sudo mount --mkdir "$bootDisk" "$bootPath"