19 lines
		
	
	
		
			538 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			538 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
case "$OSTYPE" in
 | 
						|
    darwin*)
 | 
						|
        brew install git hub
 | 
						|
        ;;
 | 
						|
    linux*)
 | 
						|
        if [[ -f /etc/arch-release ]]; then
 | 
						|
            sudo pacman --needed --noconfirm -S git hub
 | 
						|
        elif [[ -f /etc/debian-version ]]; then
 | 
						|
            sudo apt-get install -y git
 | 
						|
            if ! command -v hub >/dev/null; then
 | 
						|
                mkdir -p $HOME/builds && cd $HOME/builds
 | 
						|
                git clone https://github.com/github/hub.git && cd hub
 | 
						|
                make install prefix=/usr/local
 | 
						|
            fi
 | 
						|
        fi
 | 
						|
esac
 |