Skip to content

Commit

Permalink
Fix running antidote update in a script
Browse files Browse the repository at this point in the history
  • Loading branch information
dguo committed Jul 25, 2023
1 parent b0e41d8 commit c790607
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ jobs:
- name: Run ShellCheck
run: |
shopt -s globstar
shellcheck -e SC1090 **/*.sh
# SC1071 is for:
# "ShellCheck only supports sh/bash/dash/ksh scripts. Sorry!"
# But mac.sh is a Zsh script
shellcheck -e SC1090 -e SC1071 **/*.sh
10 changes: 4 additions & 6 deletions systems/mac/mac.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env zsh

# This is a setup script for my personal Mac. It handles both setting up a
# machine from scratch and keeping the machine up to date and clean, which means
Expand All @@ -12,9 +12,6 @@
# Exit immediately if any command fails
set -e

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
PROGRAMS_DIR="$SCRIPT_DIR/../../programs"

DOTFILES=~/code/dguo/dotfiles

hash gcc 2>/dev/null || {
Expand All @@ -27,7 +24,7 @@ hash brew 2>/dev/null || {
exit 1;
}

if [ "$(command -v zsh)" == "/bin/zsh" ]; then
if [ "$(command -v zsh)" = "/bin/zsh" ]; then
echo >&2 "Please change the system shell to the Homebrew managed Zsh:";
echo >&2 "See the Mac README for instructions";
exit 1;
Expand Down Expand Up @@ -108,8 +105,9 @@ vim +PlugClean +qall
mkdir -p ~/Library/Application\ Support/Code/User
ln -sf $DOTFILES/programs/vscode/settings.json ~/Library/Application\ Support/Code/User/settings.json
# shellcheck disable=SC1091
source "$PROGRAMS_DIR/vscode/sync-extensions.sh"
bash "$DOTFILES/programs/vscode/sync-extensions.sh"

# Zsh
ln -sf $DOTFILES/programs/zsh/zsh_plugins.txt ~/.zsh_plugins.txt
source $(brew --prefix)/opt/antidote/share/antidote/antidote.zsh
antidote update

0 comments on commit c790607

Please sign in to comment.