Skip to content

Commit

Permalink
Add ensure-zsh.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
2JS committed Feb 7, 2024
1 parent 774ab2b commit 42376e5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: ./ensure-zsh.sh
env:
SETUP_ROOT: ${{ github.workspace }}
- run: ./setup.sh
env:
SETUP_ROOT: ${{ github.workspace }}
16 changes: 16 additions & 0 deletions ensure-zsh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

export SETUP_ROOT=${SETUP_ROOT:-$HOME/.setup}
if command -v zsh >/dev/null 2>&1; then
echo "zsh is installed"
exit 0
fi

if [ "$(uname)" == "Darwin" ]; then
brew install zsh
elif [ "$(uname)" == "Linux" ]; then
sudo apt-get install -y zsh
else
echo "Unknown operating system"
# TODO: manually install zsh
fi

0 comments on commit 42376e5

Please sign in to comment.