Improve installation script
This commit is contained in:
parent
23f2115fec
commit
621b085b25
|
|
@ -1,18 +1,33 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# If Homebrew is not installed
|
||||
if ! command -v brew &> /dev/null
|
||||
if
|
||||
! command -v brew &> /dev/null
|
||||
then
|
||||
# Install Homebrew
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
fi
|
||||
|
||||
# Install dependencies
|
||||
brew install bat fd fish fzf lsd mosh neovim ripgrep stow zoxide
|
||||
|
||||
# Set fish as a default shell
|
||||
sudo echo '/usr/local/bin/fish' >> /etc/shells
|
||||
chsh -s /usr/local/bin/fish
|
||||
|
||||
FISH=`which fish`
|
||||
SHELLS="/etc/shells"
|
||||
|
||||
if
|
||||
(test -f $SHELLS) &&
|
||||
(test -z $(grep "$FISH" "$SHELLS"))
|
||||
then
|
||||
sudo bash -c "echo \"$FISH\" >> \"$SHELLS\""
|
||||
fi
|
||||
|
||||
if
|
||||
"$SHELL" != "$FISH"
|
||||
then
|
||||
chsh -s "$FISH"
|
||||
fi
|
||||
|
||||
# Symlink all configurations from .dotfiles
|
||||
stow .
|
||||
|
|
|
|||
Loading…
Reference in New Issue