Created
April 7, 2023 13:39
-
-
Save penryu/1231e5344b9abfb8f1620c051bea1425 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# Open Chrome in profile depending on the name it's invoked as. | |
# Echo URL regardless of profile | |
echo "${url:=$1}" | |
# Select profile by binary name. | |
# If invoked as..... Open in profile... | |
# wopen work | |
# gopen home | |
# <anything else> default | |
case $(basename "$0") in | |
# personal | |
gopen) profile="penryu@gmail.com" ;; | |
# work | |
wopen) profile="t.hammerquist@opendrives.com" ;; | |
# default | |
*) profile="penryu@gmail.com" ;; | |
esac | |
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \ | |
"--profile-email=$profile" "$url" >/dev/null |
Author
penryu
commented
Apr 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment