From 5cd0a5aa39c7e0bb70e17e285a97955018f34aa4 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Fri, 24 Feb 2023 17:05:48 +0000 Subject: [PATCH] Add 'itsok' function --- shell-common/.config/shell-common/functions.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/shell-common/.config/shell-common/functions.sh b/shell-common/.config/shell-common/functions.sh index 2f5ccb6..34c75f6 100644 --- a/shell-common/.config/shell-common/functions.sh +++ b/shell-common/.config/shell-common/functions.sh @@ -40,3 +40,12 @@ function demoprompt() { clear fi } + +# Tag the file as OK to run +function itsok() { + if [[ $(uname) == "Darwin" ]]; then + xattr -r -d com.apple.quarantine $1 + else + echo 'This only works on macOS...' + fi +}