Skip to content

Instantly share code, notes, and snippets.

@sseidenthal
Last active November 12, 2017 13:46
Show Gist options
  • Save sseidenthal/2db2ff121f461f7e254b8d0ca5160adb to your computer and use it in GitHub Desktop.
Save sseidenthal/2db2ff121f461f7e254b8d0ca5160adb to your computer and use it in GitHub Desktop.
unison-sync-status.1s.sh
#!/bin/bash
#
# <bitbar.title>Unison Sync Status</bitbar.title>
# <bitbar.version>v0.1</bitbar.version>
# <bitbar.author>Steve Seidenthal</bitbar.author>
# <bitbar.author.github>sseidenthal</bitbar.author.github>
# <bitbar.image></bitbar.image>
# <bitbar.desc></bitbar.desc>
# <bitbar.dependencies>unison</bitbar.dependencies>
#
# Unison Sync Status
# by Steve Seidenthal
#
# Display when unison has synced sucessfuly
export PATH='/usr/local/bin:/usr/bin:$PATH'
FILE="$HOME/unison.log"
LAST_SYNCED=$(tail -1 $FILE | grep "0 failed" | awk '{ print $4 }')
echo "unison $LAST_SYNCED"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment