Skip to content

Commit def4872

Browse files
authored
Merge pull request #1843 from basecamp/install-tools-if-needed
Install missing tools needed by bin/setup
2 parents 7a0290a + 4885e22 commit def4872

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

bin/setup

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,36 @@ if ! command -v gum &>/dev/null; then
3131
echo
3232
fi
3333

34+
# Install mise if needed
35+
if ! command -v mise &>/dev/null; then
36+
echo
37+
echo "▸ Installing mise"
38+
if command -v pacman &>/dev/null; then
39+
sudo pacman -S --noconfirm mise
40+
elif command -v brew &>/dev/null; then
41+
brew install mise
42+
else
43+
echo "Please install mise: https://mise.jdx.dev/installing-mise.html#installation-methods"
44+
exit 1
45+
fi
46+
echo
47+
fi
48+
49+
# Install gh if needed
50+
if ! command -v gh &>/dev/null; then
51+
echo
52+
echo "▸ Installing GitHub CLI"
53+
if command -v pacman &>/dev/null; then
54+
sudo pacman -S --noconfirm gh
55+
elif command -v brew &>/dev/null; then
56+
brew install gh
57+
else
58+
echo "Please install GitHub CLI: https://github.com/cli/cli#installation"
59+
exit 1
60+
fi
61+
echo
62+
fi
63+
3464
step() {
3565
local step_name="$1"
3666
shift

0 commit comments

Comments
 (0)