shellcheck improvements
This commit is contained in:
parent
57afe0b8a3
commit
c18804a91e
68
install.sh
68
install.sh
|
@ -23,13 +23,13 @@ fi
|
|||
OS=$(grep -E '^(NAME)=' /etc/os-release )
|
||||
|
||||
if [[ -z "${XDG_CONFIG_HOME}" ]]; then
|
||||
mkdir -p $HOME/.config
|
||||
XDG_CONFIG_HOME=$HOME/.config
|
||||
mkdir -p "$HOME"/.config
|
||||
XDG_CONFIG_HOME="$HOME"/.config
|
||||
fi
|
||||
|
||||
if [[ -z "${XDG_DATA_HOME}" ]]; then
|
||||
mkdir -p $HOME/.local/share
|
||||
XDG_DATA_HOME=$HOME/.local/share
|
||||
mkdir -p "$HOME"/.local/share
|
||||
XDG_DATA_HOME="$HOME"/.local/share
|
||||
fi
|
||||
|
||||
#################################################
|
||||
|
@ -39,18 +39,18 @@ fi
|
|||
if $NVIM; then
|
||||
dependencies="neovim git unzip fzf cmake gcc make curl wget ripgrep npm"
|
||||
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
|
||||
$SUDO pacman -Sy --needed --noconfirm $dependencies npm go fd
|
||||
$SUDO pacman -Sy --needed --noconfirm "$dependencies" npm go fd
|
||||
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
|
||||
$SUDO apt update
|
||||
$SUDO apt install -y software-properties-common
|
||||
$SUDO add-apt-repository ppa:neovim-ppa/unstable -y
|
||||
$SUDO curl -sL https://deb.nodesource.com/setup_21.x | $SUDO bash -
|
||||
$SUDO apt update
|
||||
$SUDO apt install -y $dependencies python3-venv nodejs golang fd-find
|
||||
$SUDO apt install -y "$dependencies" python3-venv nodejs golang fd-find
|
||||
fi
|
||||
|
||||
ln -s $PWD/nvim $XDG_CONFIG_HOME/nvim
|
||||
ln -s $PWD/clang/.clang-tidy $HOME/.clang-tidy
|
||||
ln -s "$PWD"/nvim "$XDG_CONFIG_HOME"/nvim
|
||||
ln -s "$PWD"/clang/.clang-tidy "$HOME"/.clang-tidy
|
||||
nvim --headless "+Lazy! sync" +qa
|
||||
nvim --headless "+MasonInstall bash-language-server pyright typescript-language-server rust-analyzer clangd cmake-language-server css-lsp dockerfile-language-server emmet-ls gopls html-lsp jdtls json-lsp ltex-ls lua-language-server ruff-lsp rustfmt rustywind texlab vetur-vls vim-language-server yaml-language-server" +qa
|
||||
|
||||
|
@ -63,29 +63,29 @@ if $ZSH; then
|
|||
PROFILE=true
|
||||
dependencies="fzf zsh curl zoxide"
|
||||
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
|
||||
$SUDO pacman -Sy --needed --noconfirm $dependencies zsh-autosuggestions
|
||||
$SUDO pacman -Sy --needed --noconfirm "$dependencies" zsh-autosuggestions
|
||||
echo "Please manually install yay"
|
||||
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
|
||||
$SUDO apt update
|
||||
$SUDO apt install -y $dependencies
|
||||
$SUDO apt install -y "$dependencies"
|
||||
fi
|
||||
|
||||
ln -s $PWD/zsh $XDG_CONFIG_HOME/zsh
|
||||
ln -s $PWD/zsh/.zshrc $HOME/.zshrc
|
||||
mkdir -p $HOME/.local/state/zsh/
|
||||
ln -s "$PWD"/zsh "$XDG_CONFIG_HOME"/zsh
|
||||
ln -s "$PWD"/zsh/.zshrc "$HOME"/.zshrc
|
||||
mkdir -p "$HOME"/.local/state/zsh/
|
||||
|
||||
git clone https://github.com/cxreg/smartcd.git /tmp/smartcd
|
||||
cd /tmp/smartcd
|
||||
cd /tmp/smartcd || exit
|
||||
make install
|
||||
ln -s $XDG_CONFIG_HOME/zsh/.smartcd_config $HOME/.smartcd_config
|
||||
cd -
|
||||
ln -s "$XDG_CONFIG_HOME"/zsh/.smartcd_config "$HOME"/.smartcd_config
|
||||
cd - || exit
|
||||
fi
|
||||
|
||||
#################################################
|
||||
# Profile #
|
||||
#################################################
|
||||
if $PROFILE; then
|
||||
rm -rf $HOME/.profile && ln -s $PWD/profile/.profile $HOME/.profile
|
||||
rm -rf "$HOME"/.profile && ln -s "$PWD"/profile/.profile "$HOME"/.profile
|
||||
fi
|
||||
|
||||
#################################################
|
||||
|
@ -95,16 +95,16 @@ fi
|
|||
if $AWESOME; then
|
||||
dependencies="awesome picom numlockx xcape rofi"
|
||||
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
|
||||
$SUDO pacman -Sy --needed --noconfirm $dependencies network-manager-applet xorg-xmodmap adobe-source-code-pro-fonts noto-fonts ttf-nerd-fonts-symbols
|
||||
$SUDO pacman -Sy --needed --noconfirm "$dependencies" network-manager-applet xorg-xmodmap adobe-source-code-pro-fonts noto-fonts ttf-nerd-fonts-symbols
|
||||
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
|
||||
$SUDO apt update
|
||||
$SUDO apt install -y $dependencies awesome-extra
|
||||
$SUDO apt install -y "$dependencies" awesome-extra
|
||||
fi
|
||||
|
||||
ln -s $PWD/awesome $XDG_CONFIG_HOME/awesome
|
||||
ln -s $PWD/picom/picom.conf $XDG_CONFIG_HOME/picom.conf
|
||||
ln -s $PWD/xmodmap/.Xmodmap $XDG_CONFIG_HOME/.Xmodmap
|
||||
ln -s $PWD/rofi $XDG_CONFIG_HOME/rofi
|
||||
ln -s "$PWD"/awesome "$XDG_CONFIG_HOME"/awesome
|
||||
ln -s "$PWD"/picom/picom.conf "$XDG_CONFIG_HOME"/picom.conf
|
||||
ln -s "$PWD"/xmodmap/.Xmodmap "$XDG_CONFIG_HOME"/.Xmodmap
|
||||
ln -s "$PWD"/rofi "$XDG_CONFIG_HOME"/rofi
|
||||
fi
|
||||
|
||||
#################################################
|
||||
|
@ -123,7 +123,7 @@ if $ALACRITTY; then
|
|||
$SUDO apt install -y $dependencies
|
||||
fi
|
||||
|
||||
ln -s $PWD/alacritty $XDG_CONFIG_HOME/alacritty
|
||||
ln -s "$PWD"/alacritty "$XDG_CONFIG_HOME"/alacritty
|
||||
fi
|
||||
|
||||
#################################################
|
||||
|
@ -139,7 +139,7 @@ if $MPV; then
|
|||
$SUDO apt install -y $dependencies
|
||||
fi
|
||||
|
||||
ln -s $PWD/mpv $XDG_CONFIG_HOME/mpv
|
||||
ln -s "$PWD"/mpv "$XDG_CONFIG_HOME"/mpv
|
||||
fi
|
||||
|
||||
#################################################
|
||||
|
@ -149,18 +149,18 @@ fi
|
|||
if $TMUX; then
|
||||
dependencies="tmux git zsh xdg-utils"
|
||||
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
|
||||
$SUDO pacman -Sy --needed --noconfirm $dependencies
|
||||
$SUDO pacman -Sy --needed --noconfirm "$dependencies"
|
||||
|
||||
ln -s $PWD/tmux $XDG_CONFIG_HOME/tmux
|
||||
git clone https://github.com/tmux-plugins/tpm $XDG_DATA_HOME/tmux/plugins/tpm
|
||||
$XDG_DATA_HOME/tmux/plugins/tpm/bin/install_plugins
|
||||
ln -s "$PWD"/tmux "$XDG_CONFIG_HOME"/tmux
|
||||
git clone https://github.com/tmux-plugins/tpm "$XDG_DATA_HOME"/tmux/plugins/tpm
|
||||
"$XDG_DATA_HOME"/tmux/plugins/tpm/bin/install_plugins
|
||||
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
|
||||
$SUDO apt update
|
||||
$SUDO apt install -y $dependencies
|
||||
$SUDO apt install -y "$dependencies"
|
||||
|
||||
ln -s $PWD/tmux $HOME/.tmux
|
||||
ln -s $PWD/tmux/tmux.conf $HOME/.tmux.conf
|
||||
git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm
|
||||
$HOME/.tmux/plugins/tpm/bin/install_plugins
|
||||
ln -s "$PWD"/tmux "$HOME"/.tmux
|
||||
ln -s "$PWD"/tmux/tmux.conf "$HOME"/.tmux.conf
|
||||
git clone https://github.com/tmux-plugins/tpm "$HOME"/.tmux/plugins/tpm
|
||||
"$HOME"/.tmux/plugins/tpm/bin/install_plugins
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue