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.
		
		
		
		
		
			
		
			
				
	
	
		
			35 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			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
 | 
						|
}
 | 
						|
 | 
						|
# Get dependencies
 | 
						|
"${DIRECTORY}/pkg-install" "xclip wl-clipboard feh" "$(dirname "$0")" || exit 1
 | 
						|
 | 
						|
if [ ! -d /usr/local/go ]; then
 | 
						|
  echo -e "\nInstalling Go."
 | 
						|
  wget -q --show-progress -O /tmp/go.tar.gz https://golang.org/dl/go1.14.6.linux-armv6l.tar.gz
 | 
						|
  sudo tar -C /usr/local -xzf /tmp/go.tar.gz && rm /tmp/go.tar.gz
 | 
						|
  echo
 | 
						|
  /usr/local/go/bin/go version || error "Failed to install go somehow!"
 | 
						|
else
 | 
						|
  echo "Go is already installed. Moving to next step."
 | 
						|
fi
 | 
						|
 | 
						|
echo -e "\nDownloading Cordless."
 | 
						|
GO111MODULE=on /usr/local/go/bin/go get -u "github.com/Bios-Marcel/cordless"
 | 
						|
echo "[Desktop Entry]
 | 
						|
Name=Cordless
 | 
						|
Exec=${HOME}/go/bin/cordless
 | 
						|
Path=${HOME}/go/bin/
 | 
						|
Icon=terminal
 | 
						|
Type=Application
 | 
						|
Comment=Cordless is a custom Discord client that aims to have a low memory footprint and be aimed at power-users.
 | 
						|
Categories=Network
 | 
						|
Terminal=true
 | 
						|
X-KeepTerminal=true" > ~/.local/share/applications/cordless.desktop
 |