make portable to fedora

This commit is contained in:
2022-11-22 08:30:59 -05:00
parent 0a1872e53f
commit 7d1b5adecf
4 changed files with 27 additions and 8 deletions

20
init.sh
View File

@@ -1,32 +1,40 @@
#!/bin/bash
which apt && PKGINST='sudo apt install -y' && PKGUPD='sudo apt update' || which dnf && PKGINST='sudo dnf install -y' && PKGUPD='sudo dnf update -y'
echo "PKGUPD: ${PKGUPD}"
echo "PKGINST: ${PKGINST}"
#Install zsh #Install zsh
#Install neovim #Install neovim
#Install ripgrep #Install ripgrep
#Install fd #Install fd
sudo add-apt-repository ppa:neovim-ppa/stable which apt && sudo add-apt-repository ppa:neovim-ppa/stable || which dnf && sudo dnf copr enable agriffis/neovim-nightly
sudo apt update && sudo apt install -y zsh neovim ripgrep fd-find fzf [[ $PKGINST != '' ]] && $PKGUPD && $PKGINST zsh neovim ripgrep fd-find fzf
#Install oh-my-zsh #Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
#Install oh-my-zsh plugins #Install oh-my-zsh plugins
if [[ -d $HOME/.oh-my-zsh ]]; then
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
fi
#install vim-plug #install vim-plug
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
#Clone dotfiles #Clone dotfiles
cd ~ && git clone https://github.com/jbohanon/.dotfiles [[ ! -d $HOME/.dotfiles ]] && cd $HOME && git clone https://github.com/jbohanon/.dotfiles
#Make directories & symlinks #Make directories & symlinks
mkdir $HOME/.config mkdir $HOME/.config
ln -s $HOME/.dotfiles/zsh $HOME/.config/zsh ln -s $HOME/.dotfiles/zsh $HOME/.config/zsh
ln -s $HOME/.dotfiles/nvim $HOME/.config/nvim ln -s $HOME/.dotfiles/nvim $HOME/.config/nvim
ln -s $HOME/.config/nvim/.vimrc $HOME/.vimrc ln -s $HOME/.config/nvim/init.vim $HOME/.vimrc
ln -s $HOME/.config/zsh/.zshrc $HOME/.zshrc ln -s $HOME/.config/zsh/.zshrc $HOME/.zshrc
#Install powerline-fonts #Install powerline-fonts
sudo apt install fonts-powerline which apt && $PKGINST fonts-powerline || which dnf && $PKGINST powerline-fonts
#Install starship #Install starship
curl -sS https://starship.rs/install.sh | sh curl -sS https://starship.rs/install.sh | sh
#Install mygvm #Install mygvm
mkdir $HOME/go mkdir $HOME/go
mkdir -p $HOME/.go/downloads mkdir -p $HOME/.go/downloads
ln -s $HOME/.dotfiles/zsh/mygvm /usr/local/bin/mygvm sudo ln -s $HOME/.dotfiles/zsh/mygvm /usr/local/bin/mygvm
#Install Go #Install Go
mygvm go1.18.6 mygvm go1.18.6

1
nvim/nvim Symbolic link
View File

@@ -0,0 +1 @@
/home/jacob/.dotfiles/nvim

View File

@@ -0,0 +1,9 @@
# The following lines were added by compinstall
zstyle ':completion:*' completer _complete _ignored
zstyle :compinstall filename '/home/jacob/.dotfiles/zsh/config.d/completion.zsh'
autoload -Uz compinit
compinit
# End of lines added by compinstall

1
zsh/zsh Symbolic link
View File

@@ -0,0 +1 @@
/home/jacob/.dotfiles/zsh