From 215f8d410734b24bf8142a122159d9cd6ab44b82 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Tue, 22 Oct 2024 22:57:43 +0200 Subject: [PATCH] Update scripts --- dotfiles/.local/bin/open.sh | 1 + dotfiles/.local/bin/popup.sh | 1 + dotfiles/.local/bin/upgradeCasks.sh | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) diff --git a/dotfiles/.local/bin/open.sh b/dotfiles/.local/bin/open.sh index f7afa71..dadfd88 100755 --- a/dotfiles/.local/bin/open.sh +++ b/dotfiles/.local/bin/open.sh @@ -2,3 +2,4 @@ sleep 3 /Applications/Alacritty.app/Contents/MacOS/alacritty -t "scratchpad" & +#/opt/homebrew/bin/kitty -T "scratchpad" & diff --git a/dotfiles/.local/bin/popup.sh b/dotfiles/.local/bin/popup.sh index e5debd1..758dded 100755 --- a/dotfiles/.local/bin/popup.sh +++ b/dotfiles/.local/bin/popup.sh @@ -3,3 +3,4 @@ TITLE=mylauncher alacritty -t "${TITLE}" --config-file=$HOME/.config/alacritty/alacritty-launcher.toml --working-directory "$(pwd)" -e "$1" +#kitty -T "${TITLE}" -d "$(pwd)" -e "$1" diff --git a/dotfiles/.local/bin/upgradeCasks.sh b/dotfiles/.local/bin/upgradeCasks.sh index 8fa48f9..874fbbc 100755 --- a/dotfiles/.local/bin/upgradeCasks.sh +++ b/dotfiles/.local/bin/upgradeCasks.sh @@ -1,4 +1,21 @@ #!/bin/sh +if ! plutil -lint /Library/Preferences/com.apple.TimeMachine.plist > /dev/null ; then + echo "This script requires your terminal app to have Full Disk Access." + echo "Add this terminal to the Full Disk Access list or use Apple Terminal." + exit 1 +fi + BREW_IGNORE_LIST=$(cat "$XDG_CACHE_HOME"/brew_ignore | tr '\n' '|' | sed 's/.$//' | sed 's/|/\\|/g') + +if [ "$1" = "--dry-run" ]; then + if [ "$2" = "--all" ]; then + brew upgrade --dry-run --cask --greedy --force + # brew outdated --cask --greedy --verbose + else + brew upgrade --dry-run --cask --greedy --force $(brew list --cask | grep --invert-match --regexp $BREW_IGNORE_LIST) + fi + exit 0 +fi + brew upgrade --cask --greedy --force $(brew list --cask | grep --invert-match --regexp $BREW_IGNORE_LIST)