#!/bin/sh # Bundle executable: starts the synchronization agent. If this device has not # been signed in yet, open Terminal so the user can do it. set -eu here=$(cd "$(dirname "$0")" && pwd) keeporg="$here/keeporg" config="$HOME/Library/Application Support/keeporg/config.json" if [ ! -f "$config" ]; then osascript -e "tell application \"Terminal\" to do script \"'$keeporg' login -server https://keeporg.example.com -user \$USER\"" \ -e 'tell application "Terminal" to activate' exit 0 fi exec "$keeporg" run