-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
cask "parallels" | ||
cask "sonos" | ||
cask "steam", args: { require_sha: false } | ||
cask "obs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/zsh | ||
|
||
set -eo pipefail | ||
|
||
print -P "\n[ %5Fhomebrew%f ] πΊ cleanup\n" | ||
|
||
# check if the Brewfile.all file exists | ||
[ ! -f Brewfile.all ] && print -P "β %178Faborting%f Brewfile.all not found" && exit 1 | ||
|
||
# execute command | ||
cmd="brew bundle cleanup --file Brewfile.all --force" | ||
print -P "%244F> $cmd%f" && eval "$cmd" | ||
|
||
print -P "\n[ %76Fβ%f ] πΊ done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/zsh | ||
|
||
set -eo pipefail | ||
|
||
print -P "\n[ %5Fhomebrew%f ] πΊ install\n" | ||
|
||
# check if the Brewfile file exists | ||
[ ! -f Brewfile ] && print -P "β %178Faborting%f Brewfile not found" && exit 1 | ||
# check if the Brewfile.optional file exists | ||
[ ! -f Brewfile.optional ] && print -P "β %178Faborting%f Brewfile.optional not found" && exit 1 | ||
|
||
# get the local computer's name and save it to a variable | ||
machine_name=$(hostname) | ||
|
||
# get the contents of the Brewfile and Brewfile.optional files and join them | ||
brewfile_all="$(cat Brewfile)$(cat Brewfile.optional)" | ||
|
||
# switch statement to check the machine_name variable | ||
case $machine_name in | ||
"0x73746f65") | ||
print -P "[ %5Fhomebrew%f ] πΊ πΌ\n" | ||
|
||
# check if the Brewfile.work file exists | ||
[ ! -f Brewfile.work ] && print -P "β %178Faborting%f Brewfile.work not found" && exit 1 | ||
|
||
# get the contents of the Brewfile.work file and join it with the contents of the Brewfile_all variable | ||
brewfile_all="$brewfile_all$(cat Brewfile.work)" | ||
;; | ||
"6x73746f65") | ||
print -P "[ %5Fhomebrew%f ] πΊ π \n" | ||
|
||
# check if the Brewfile.personal file exists | ||
[ ! -f Brewfile.personal ] && print -P "β %178Faborting%f Brewfile.personal not found" && exit 1 | ||
|
||
# get the contents of the Brewfile.personal file and join it with the contents of the Brewfile_all variable | ||
brewfile_all="$brewfile_all$(cat Brewfile.personal)" | ||
;; | ||
*) | ||
print -P "β %178Faborting%f Unknown machine name: $machine_name" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# write the contents of the joined Brewfile files to a new file | ||
echo "$brewfile_all" > Brewfile.all | ||
|
||
# execute command | ||
cmd="brew bundle --file Brewfile.all" | ||
print -P "%244F> $cmd%f" && eval "$cmd" | ||
|
||
print -P "\n[ %76Fβ%f ] πΊ done" |