Update
This commit is contained in:
		
							parent
							
								
									d563f576b3
								
							
						
					
					
						commit
						83046d2590
					
				| 
						 | 
					@ -0,0 +1,17 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ping -c 1 1.1.1.1 > /dev/null
 | 
				
			||||||
 | 
					have_internet="$?"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ "$have_internet" -eq 0 ]; then
 | 
				
			||||||
 | 
					    echo "Checking for available updates..."
 | 
				
			||||||
 | 
					    checkupdates
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					    echo "There appears to be no internet connection."
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Finish!"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "This window may close!"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					sleep 5
 | 
				
			||||||
| 
						 | 
					@ -1,9 +0,0 @@
 | 
				
			||||||
#!/bin/bash
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
checkupdates
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo "Finish!"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo "This window may close!"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
sleep 5
 | 
					 | 
				
			||||||
| 
						 | 
					@ -105,7 +105,7 @@ fn main() {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        Ok(Message::CheckUpdates) => {
 | 
					        Ok(Message::CheckUpdates) => {
 | 
				
			||||||
            // println!("Checking Updates");
 | 
					            // println!("Checking Updates");
 | 
				
			||||||
            let cmd = "/usr/bin/konsole --noclose --separate -e /bin/sh -c /usr/share/melawy-linux-updater-tray/scripts/checkupdates.sh";
 | 
					            let cmd = "/usr/bin/konsole --noclose --separate -e /bin/sh -c /usr/share/melawy-linux-updater-tray/scripts/check_updates.sh";
 | 
				
			||||||
            let _ = run_cmd(cmd, None);
 | 
					            let _ = run_cmd(cmd, None);
 | 
				
			||||||
            glib::ControlFlow::Continue
 | 
					            glib::ControlFlow::Continue
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue