mirror of
				https://github.com/ValdikSS/windows2usb.git
				synced 2023-08-10 21:13:16 +03:00 
			
		
		
		
	Handle ctrl+c and errors better
This commit is contained in:
		@@ -100,8 +100,11 @@ function extract_iso() {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function umount_rm_path() {
 | 
					function umount_rm_path() {
 | 
				
			||||||
    umount "$1" || true
 | 
					    if [ -d "$1" ];
 | 
				
			||||||
    rm -r "$1"
 | 
					    then
 | 
				
			||||||
 | 
					        umount "$1" || true
 | 
				
			||||||
 | 
					        rm -r "$1"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function sigint_handler() {
 | 
					function sigint_handler() {
 | 
				
			||||||
@@ -132,7 +135,7 @@ then
 | 
				
			|||||||
    partpath="$(mktemp -d /run/winiso-write.XXXXXXXXXX)"
 | 
					    partpath="$(mktemp -d /run/winiso-write.XXXXXXXXXX)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    check_requirements
 | 
					    check_requirements
 | 
				
			||||||
    trap sigint_handler INT
 | 
					    trap sigint_handler INT EXIT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # MBR
 | 
					    # MBR
 | 
				
			||||||
    if [[ "$labeltype" == "mbr" ]];
 | 
					    if [[ "$labeltype" == "mbr" ]];
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user