You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			23 lines
		
	
	
		
			601 B
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			23 lines
		
	
	
		
			601 B
		
	
	
	
		
			Bash
		
	
#!/bin/bash
 | 
						|
 | 
						|
DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"
 | 
						|
 | 
						|
function error {
 | 
						|
  echo -e "\\e[91m$1\\e[39m"
 | 
						|
  exit 1
 | 
						|
}
 | 
						|
 | 
						|
VERSION=arduino-1.8.15
 | 
						|
 | 
						|
if [ -f ~/.local/share/$VERSION/uninstall.sh ];then
 | 
						|
  cd ~/.local/share
 | 
						|
  $VERSION/uninstall.sh || error "Failed to run uninstall.sh as $USER user"
 | 
						|
  sudo $VERSION/uninstall.sh || error "Failed to run uninstall.sh as root user"
 | 
						|
  rm -rf $VERSION || error "Failed to remove $VERSION folder"
 | 
						|
  cd
 | 
						|
else
 | 
						|
  echo "WARNING: Arduino's uninstall.sh script was not found! Most likely it was never fully installed."
 | 
						|
fi
 | 
						|
 | 
						|
exit 0
 |