From 3c46bb9f05cfc20f72f6d87b161df3d65a99bf9c Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Wed, 13 May 2020 12:33:00 -0400 Subject: [PATCH] what would shellcheck do --- .github/workflows/lint.yml | 8 ++------ install.sh | 9 +++++---- macos/macos.sh | 3 ++- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c121644..75cb0ce 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,14 +1,10 @@ name: Lint -on: - push: - branches: - - master +on: [push, pull_request] jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: azohra/shell-linter@master - continue-on-error: true diff --git a/install.sh b/install.sh index 3ec1fa5..cbba569 100755 --- a/install.sh +++ b/install.sh @@ -5,9 +5,9 @@ set -e echo "👋 Deep breaths, everything will (probably) be fine!" # Set up symbolic links for ZSH and Git pointing to this cloned repo -ln -sf $HOME/.dotfiles/zsh/.zshrc $HOME/.zshrc -ln -sf $HOME/.dotfiles/git/.gitconfig $HOME/.gitconfig -ln -sf $HOME/.dotfiles/git/.gitignore_global $HOME/.gitignore_global +ln -sf "$HOME"/.dotfiles/zsh/.zshrc "$HOME"/.zshrc +ln -sf "$HOME"/.dotfiles/git/.gitconfig "$HOME"/.gitconfig +ln -sf "$HOME"/.dotfiles/git/.gitignore_global "$HOME"/.gitignore_global # Get Oh My ZSH up and running if [ ! -e ~/.oh-my-zsh ]; then @@ -15,7 +15,8 @@ if [ ! -e ~/.oh-my-zsh ]; then fi # Make ZSH the default shell environment (maybe unnecessary on Catalina?) -chsh -s $(which zsh) +# shellcheck disable=SC2230 +chsh -s "$(which zsh)" if [ "$(uname)" == "Darwin" ]; then # shellcheck disable=SC1091 diff --git a/macos/macos.sh b/macos/macos.sh index 4bf6447..c95fb2b 100755 --- a/macos/macos.sh +++ b/macos/macos.sh @@ -11,7 +11,8 @@ sudo softwareupdate --install --all # This whole thing kinda hinges on having Homebrew... # Check for it and install from GitHub if it's not there -if test ! $(which brew); then +# shellcheck disable=SC2230 +if test ! "$(which brew)"; then /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" fi