Improve installation script
This commit is contained in:
parent
23f2115fec
commit
621b085b25
|
|
@ -1,18 +1,33 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# If Homebrew is not installed
|
# If Homebrew is not installed
|
||||||
if ! command -v brew &> /dev/null
|
if
|
||||||
|
! command -v brew &> /dev/null
|
||||||
then
|
then
|
||||||
# Install Homebrew
|
# 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
|
fi
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
brew install bat fd fish fzf lsd mosh neovim ripgrep stow zoxide
|
brew install bat fd fish fzf lsd mosh neovim ripgrep stow zoxide
|
||||||
|
|
||||||
# Set fish as a default shell
|
# 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
|
# Symlink all configurations from .dotfiles
|
||||||
stow .
|
stow .
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue