Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- PROFILE_NAME=$1
- mkdir -p "/Applications/Google Chrome $1.app/Contents/MacOS"
- F="/Applications/Google Chrome $1.app/Contents/MacOS/Google Chrome $1"
- cat > "$F" <<\EOF
- #!/bin/bash
- #
- # Google Chrome for Mac with additional profile.
- #
- # Name your profile:
- EOF
- echo "PROFILE_NAME='$PROFILE_NAME'" >> "$F"
- cat >> "$F" <<\EOF
- # Store the profile here:
- PROFILE_DIR="/Users/$USER/Library/Application Support/Google/Chrome/${PROFILE_NAME}"
- # Find the Google Chrome binary:
- CHOME_BIN="/Users/$USER/Applications/Google Chrome ${PROFILE_NAME}.app/Contents/MacOS/Google Chrome"
- if [[ ! -e "$CHOME_BIN" ]]; then
- echo "ERROR: Can not find Google Chrome. Exiting."
- exit -1
- fi
- # Start me up!
- exec "$CHOME_BIN" --enable-udd-profiles --user-data-dir="$PROFILE_DIR"
- EOF
- sudo chmod +x "$F"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement