26 lines
		
	
	
		
			734 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			734 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
if [[ "$SHELL" != *zsh ]]; then
 | 
						|
    case "$OSTYPE" in
 | 
						|
        darwin*)
 | 
						|
            brew install zsh fzf fasd
 | 
						|
 | 
						|
            # Add homebrewed zsh to /etc/shells
 | 
						|
            if ! grep '/usr/local/bin/zsh' /etc/shells >/dev/null; then
 | 
						|
                sudo tee -a /etc/shells <<< "/usr/local/bin/zsh"
 | 
						|
            fi
 | 
						|
            ;;
 | 
						|
        linux*)
 | 
						|
            if [[ -f /etc/arch-release ]]; then
 | 
						|
                sudo pacman --needed --noconfirm -S zsh fzf fasd
 | 
						|
            elif [[ -f /etc/debian_version ]]; then
 | 
						|
                sudo add-apt-repository ppa:aacebedo/fasd
 | 
						|
                sudo apt-get update
 | 
						|
                sudo apt-get install -y zsh fasd fzf
 | 
						|
            fi
 | 
						|
            ;;
 | 
						|
    esac
 | 
						|
 | 
						|
    chsh -s $(which zsh)
 | 
						|
fi
 |