mirror of
https://github.com/tedkulp/dotfiles
synced 2026-04-25 22:58:54 -04:00
Add most of the linux stuff in
This commit is contained in:
+92
-1
@@ -2,24 +2,115 @@
|
||||
|
||||
cd $HOME
|
||||
|
||||
# What are we packing?
|
||||
system_type=$(uname -s)
|
||||
|
||||
# Install submodules
|
||||
echo "Init submodules"
|
||||
yadm submodule update --recursive --init
|
||||
|
||||
# Link in our tmux config
|
||||
if [ ! -f "$HOME/.tmux.conf" ]; then
|
||||
ln -s -f .tmux/.tmux.conf
|
||||
fi
|
||||
|
||||
# Create $GOHOME if necessary
|
||||
if [ ! -d "$HOME/go" ]; then
|
||||
mkdir $HOME/go
|
||||
fi
|
||||
|
||||
# Update our origin URL to the git version now that we have
|
||||
# our ssh config stuff downloaded
|
||||
echo "Updating the yadm repo origin URL"
|
||||
yadm remote set-url origin "git@github.com:tedkulp/dotfiles.git"
|
||||
|
||||
# Mac Specifics
|
||||
if [ "$system_type" = "Darwin" ]; then
|
||||
|
||||
# install homebrew if it's missing
|
||||
# Install Homebrew if it's missing
|
||||
if ! command -v brew >/dev/null 2>&1; then
|
||||
echo "Installing homebrew"
|
||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
fi
|
||||
|
||||
# Install all the stuff in Brewfile (get comfortable... have some coffee or adult beverage)
|
||||
if [ -f "$HOME/.Brewfile" ]; then
|
||||
echo "Updating homebrew bundle"
|
||||
brew bundle --global
|
||||
fi
|
||||
fi
|
||||
|
||||
# Linux Specifics
|
||||
if [ "$system_type" = "Linux" ]; then
|
||||
|
||||
# Install apt stuff
|
||||
sudo apt update -y
|
||||
sudo apt upgrade -y
|
||||
sudo apt install -y zsh software-properties-common python-dev python3-dev python3-pip
|
||||
|
||||
# Install node if necessary
|
||||
if ! command -v node >/dev/null 2>&1; then
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
|
||||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
nvm install node
|
||||
fi
|
||||
|
||||
# Install rust and cargo in necessary
|
||||
if ! command -v cargo >/dev/null 2>&1; then
|
||||
curl https://sh.rustup.rs -sSf > rustup-init.sh
|
||||
chmod 755 rustup-init.sh
|
||||
./rustup-init.sh -y
|
||||
rm rustup-init.sh
|
||||
fi
|
||||
|
||||
# Install neovim if necessary
|
||||
if ! command -v nvim >/dev/null 2>&1; then
|
||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install neovim -y
|
||||
fi
|
||||
|
||||
# Install lunarvim
|
||||
if ! command -v lvim >/dev/null 2>&1; then
|
||||
bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh)
|
||||
lvim +PackerSync
|
||||
fi
|
||||
|
||||
# Install fzf if necessary
|
||||
if ! command -v fzf >/dev/null 2>&1; then
|
||||
git clone --depth 1 https://github.com/junegunn/fzf.git $HOME/.fzf
|
||||
$HOME/.fzf/install --bin --no-key-bindings --no-completion --no-update-rc
|
||||
fi
|
||||
|
||||
# Install go if necessary
|
||||
if ! command -v go >/dev/null 2>&1; then
|
||||
curl -sLk https://git.io/gobrew | sh -
|
||||
export PATH="$HOME/.gobrew/current/bin:$HOME/.gobrew/bin:$PATH"
|
||||
export GOPATH="$HOME/.gobrew/current/go"
|
||||
gobrew use 1.17
|
||||
fi
|
||||
|
||||
# Install powerline-go if necessary
|
||||
if ! command -v powerline-go >/dev/null 2>&1; then
|
||||
go install github.com/justjanne/powerline-go@latest
|
||||
fi
|
||||
|
||||
# Install autojump if necessary
|
||||
if ! command -v autojump >/dev/null 2>&1; then
|
||||
git clone git://github.com/wting/autojump.git
|
||||
cd $HOME/autojump
|
||||
./install.py
|
||||
cd $HOME
|
||||
fi
|
||||
fi
|
||||
|
||||
# Oh My ZSH
|
||||
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
||||
echo "Installing oh-my-zsh. Install zsh as default, but then exit out to continue."
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
fi
|
||||
|
||||
# Wrapping up
|
||||
echo "Don't forget to run yadm decrypt!"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user