Skip to content

Commit

Permalink
Install dependencies from script
Browse files Browse the repository at this point in the history
  • Loading branch information
nickrodgers42 committed Oct 31, 2023
1 parent 738ebf6 commit 146993f
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 58 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,15 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
chosen-os:
description: "OS to run on"
required: true
type: choice
options:
- ubuntu-latest
- macos-latest

jobs:
install-script:
runs-on: ${{ inputs.chosen-os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Run Install script
Expand Down
41 changes: 0 additions & 41 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,6 @@ NVIM_HOME := $(shell echo $${XDG_DATA_HOME:-$$HOME/.local/share})
INIT_DIR := $(HOME)/.config/nvim


brewinstall:
/bin/bash -c "$$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"


brewdeps:
brew install \
bat \
exa \
fd \
fzf \
gcc \
make \
neovim \
ripgrep \
stow \
tmux


brewenv:
(echo; echo 'eval "$$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/runner/.bashrc
eval "$$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"


nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash


node:
nvm install node


nodedeps:
npm i -g \
eslint \
tldr


tpm:
-git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm


vim:
stow -t ~ --ignore=ftplugin vim
mkdir -p $(INIT_DIR)
Expand Down
42 changes: 36 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

install_brew() {
echo "Installing brew..."
/bin/bash -c "$$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
}

install_brew_deps() {
echo "Installing dependencies from brew..."
brew install \
bat \
exa \
eza \
fd \
fzf \
gcc \
Expand All @@ -20,17 +20,47 @@ install_brew_deps() {
tmux
}

install_nvm() {
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
}

install_node() {
nvm install node
}

install_node_deps() {
npm i -g \
eslint \
tldr
}

install_tpm() {
-git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
}

stow_dotfiles() {
make stowall
}

install() {
local OS=$(uname -s)

install_brew
if [[ $OS eq "Linux" ]]
if [[ $OS = "Linux" ]]
then
(echo; echo 'eval "$$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/runner/.bashrc
eval "$$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/runner/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
fi

install_brew_deps
# install_brew_deps
install_nvm
install_node
install_node_deps
install_tpm
stow_dotfiles
}

install
2 changes: 1 addition & 1 deletion zsh/.alias
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
alias vim="nvim"
alias cat="bat"
alias ls="exa"
alias ls="eza"

0 comments on commit 146993f

Please sign in to comment.