feat: add mac support with homebrew

This commit is contained in:
xeruf 2024-07-13 18:15:52 +03:00
parent 0466b87b84
commit 13aefb37d8
6 changed files with 13 additions and 0 deletions

7
handlers.available.mac Normal file
View File

@ -0,0 +1,7 @@
bash
zsh
make
git
binary
npm
nix

2
handlers/homebrew/install Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh -e
brew install "$@"

View File

@ -193,6 +193,7 @@ if ! test -f "$handlersfile"
then
copy="$(case "$(uname)" in
(MINGW64*) echo "$dir_home/handlers.available.windows";;
(DARWIN) echo "$dir_home/handlers.available.mac";;
(*) ls "$dir_home/$({ cat /etc/os-release | grep -E '^ID(_LIKE)?=' | cut -d= -f2 | grep . || lsb_release -s -i | tr 'A-Z' 'a-z'; } |
sed 's/^/handlers.available./' | paste -d' ' -s)" 2>/dev/null | head -1;;
esac)" &&

View File

0
packages/git/homebrew Normal file
View File

3
packages/homebrew/bash Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
# https://brew.sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"