diff --git a/functions.md b/functions.md index 2badd9d..4cfacca 100644 --- a/functions.md +++ b/functions.md @@ -21,7 +21,9 @@ ### App Icons #### Create App Icon + Function to quickly create an application icon from 1024px master file. + ```bash function mkicns() { if [[ -z "$@" ]]; then @@ -45,6 +47,33 @@ function mkicns() { } ``` +### Helper functions + +#### Ask user for a password + +This function will use AppleScript to present a password entry dialog to make +your scripts a little more user friendly. + +```bash +function gui_password { + if [[ -z $1 ]]; then + gui_prompt="Password:" + else + gui_prompt="$1" + fi + PW=$(osascript <