woo
This commit is contained in:
		@@ -132,7 +132,7 @@ case $selection in
 | 
				
			|||||||
                    exit
 | 
					                    exit
 | 
				
			||||||
                    ;;
 | 
					                    ;;
 | 
				
			||||||
                1)
 | 
					                1)
 | 
				
			||||||
                    printf '%s\0' "${update_selection[@]}" | grep -Fxqz -- "-b" && echo -e "$OPTARG is already on here, skipping" && sleep 5 && continue #If option is already on there, skip it
 | 
					                    printf '%s\0' "${update_selection[@]}" | grep -Fxqz -- "-b" && echo -e "\"-b\" is already on here, skipping" && sleep 5 && continue #If option is already on there, skip it
 | 
				
			||||||
                    echo "Up to how many backups should we keep?"
 | 
					                    echo "Up to how many backups should we keep?"
 | 
				
			||||||
                    read -rt 600 -p "Please type an integer: " up_backups
 | 
					                    read -rt 600 -p "Please type an integer: " up_backups
 | 
				
			||||||
                    ! [[ $up_backups =~ ^[0-9]+$ ]] && echo -e "Error: \"$up_backups\" is invalid, it needs to be an integer\nNOT adding it to the list" && sleep 5 && continue
 | 
					                    ! [[ $up_backups =~ ^[0-9]+$ ]] && echo -e "Error: \"$up_backups\" is invalid, it needs to be an integer\nNOT adding it to the list" && sleep 5 && continue
 | 
				
			||||||
@@ -144,31 +144,31 @@ case $selection in
 | 
				
			|||||||
                    update_selection+=("-i" "$up_ignore")
 | 
					                    update_selection+=("-i" "$up_ignore")
 | 
				
			||||||
                    ;;
 | 
					                    ;;
 | 
				
			||||||
                3)
 | 
					                3)
 | 
				
			||||||
                    printf '%s\0' "${update_selection[@]}" | grep -Fxqz "-r" && echo -e "$OPTARG is already on here, skipping" && sleep 5 && continue #If option is already on there, skip it
 | 
					                    printf '%s\0' "${update_selection[@]}" | grep -Fxqz -- "-r" && echo -e "\"-r\" is already on here, skipping" && sleep 5 && continue #If option is already on there, skip it
 | 
				
			||||||
                    update_selection+=("-r")
 | 
					                    update_selection+=("-r")
 | 
				
			||||||
                    
 | 
					                    
 | 
				
			||||||
                    ;;
 | 
					                    ;;
 | 
				
			||||||
                4)
 | 
					                4)
 | 
				
			||||||
                    printf '%s\0' "${update_selection[@]}" | grep -Fxqz "-S" && echo -e "$OPTARG is already on here, skipping" && sleep 5 && continue #If option is already on there, skip it
 | 
					                    printf '%s\0' "${update_selection[@]}" | grep -Fxqz -- "-S" && echo -e "\"-S\" is already on here, skipping" && sleep 5 && continue #If option is already on there, skip it
 | 
				
			||||||
                    update_selection+=("-S")
 | 
					                    update_selection+=("-S")
 | 
				
			||||||
                    ;;
 | 
					                    ;;
 | 
				
			||||||
                5)
 | 
					                5)
 | 
				
			||||||
                    printf '%s\0' "${update_selection[@]}" | grep -Fxqz "-v" && echo -e "$OPTARG is already on here, skipping" && sleep 5 && continue #If option is already on there, skip it
 | 
					                    printf '%s\0' "${update_selection[@]}" | grep -Fxqz -- "-v" && echo -e "\"-v\" is already on here, skipping" && sleep 5 && continue #If option is already on there, skip it
 | 
				
			||||||
                    update_selection+=("-v")
 | 
					                    update_selection+=("-v")
 | 
				
			||||||
                    ;;
 | 
					                    ;;
 | 
				
			||||||
                6)
 | 
					                6)
 | 
				
			||||||
                    printf '%s\0' "${update_selection[@]}" | grep -Fxqz "-t" && echo -e "$OPTARG is already on here, skipping" && sleep 5 && continue #If option is already on there, skip it
 | 
					                    printf '%s\0' "${update_selection[@]}" | grep -Fxqz -- "-t" && echo -e "\"-t\" is already on here, skipping" && sleep 5 && continue #If option is already on there, skip it
 | 
				
			||||||
                    echo "What do you want your timeout to be?"
 | 
					                    echo "What do you want your timeout to be?"
 | 
				
			||||||
                    read -rt 600 -p "Please type an integer: " up_timeout
 | 
					                    read -rt 600 -p "Please type an integer: " up_timeout
 | 
				
			||||||
                    ! [[ $up_timeout =~ ^[0-9]+$ ]] && echo -e "Error: \"$up_timeout\" is invalid, it needs to be an integer\nNOT adding it to the list" && sleep 5 && continue
 | 
					                    ! [[ $up_timeout =~ ^[0-9]+$ ]] && echo -e "Error: \"$up_timeout\" is invalid, it needs to be an integer\nNOT adding it to the list" && sleep 5 && continue
 | 
				
			||||||
                    update_selection+=("-t" "$up_timeout")
 | 
					                    update_selection+=("-t" "$up_timeout")
 | 
				
			||||||
                    ;;
 | 
					                    ;;
 | 
				
			||||||
                7)
 | 
					                7)
 | 
				
			||||||
                    printf '%s\0' "${update_selection[@]}" | grep -Fxqz "-s" && echo -e "$OPTARG is already on here, skipping" && sleep 5 && continue #If option is already on there, skip it
 | 
					                    printf '%s\0' "${update_selection[@]}" | grep -Fxqz -- "-s" && echo -e "\"-s\" is already on here, skipping" && sleep 5 && continue #If option is already on there, skip it
 | 
				
			||||||
                    update_selection+=("-s")
 | 
					                    update_selection+=("-s")
 | 
				
			||||||
                    ;;
 | 
					                    ;;
 | 
				
			||||||
                8)
 | 
					                8)
 | 
				
			||||||
                    printf '%s\0' "${update_selection[@]}" | grep -Fxqz "-p" && echo -e "$OPTARG is already on here, skipping" && sleep 5 && continue #If option is already on there, skip it
 | 
					                    printf '%s\0' "${update_selection[@]}" | grep -Fxqz -- "-p" && echo -e "\"-p\" is already on here, skipping" && sleep 5 && continue #If option is already on there, skip it
 | 
				
			||||||
                    update_selection+=("-p")
 | 
					                    update_selection+=("-p")
 | 
				
			||||||
                    ;;
 | 
					                    ;;
 | 
				
			||||||
                *)
 | 
					                *)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user