Created
May 3, 2019 15:30
-
-
Save tystr/e865496a2a00d2dbeb1a5d92291d0552 to your computer and use it in GitHub Desktop.
Bash script to launch chrome in app mode on macOS
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/bash | |
# Launches chrome in app mode using the first argument to this command as the url. | |
if [ -z "$1" ]; then | |
echo "You must specify a full URL." | |
exit 1; | |
elif [[ ! $1 =~ ^https?:\/\/ ]]; then | |
echo "Url must begin with \"http://\" or \"https://\"" | |
exit 1; | |
fi | |
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app="$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment