From 2b3f64646ced613b3a612442f1795b5005c2220b Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 30 Jul 2025 13:40:43 +0100 Subject: [PATCH] [macos] Combine macOS specific functions --- macos/.config/shell-common/brewfile.sh | 4 ---- macos/.config/shell-common/{dock.sh => macos.sh} | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) delete mode 100644 macos/.config/shell-common/brewfile.sh rename macos/.config/shell-common/{dock.sh => macos.sh} (56%) diff --git a/macos/.config/shell-common/brewfile.sh b/macos/.config/shell-common/brewfile.sh deleted file mode 100644 index f30b443..0000000 --- a/macos/.config/shell-common/brewfile.sh +++ /dev/null @@ -1,4 +0,0 @@ -# Updates Homebrew installation from the Brewfile -function update-brewfile() { - brew bundle check --file "$HOME/.config/Brewfile" || brew bundle --cleanup -f --file "$HOME/.config/Brewfile" -} diff --git a/macos/.config/shell-common/dock.sh b/macos/.config/shell-common/macos.sh similarity index 56% rename from macos/.config/shell-common/dock.sh rename to macos/.config/shell-common/macos.sh index f0884d5..75a76bf 100644 --- a/macos/.config/shell-common/dock.sh +++ b/macos/.config/shell-common/macos.sh @@ -1,3 +1,17 @@ +# Tag the file as OK to run +function itsok() { + if [[ $(uname) == "Darwin" ]]; then + xattr -d com.apple.quarantine $1 + else + echo 'This only works on macOS...' + fi +} + +# Updates Homebrew installation from the Brewfile +function update-brewfile() { + brew bundle check --file "$HOME/.config/Brewfile" || brew bundle --cleanup -f --file "$HOME/.config/Brewfile" +} + # Updates the dock function update-dock() { idx=1