Last active
November 12, 2017 13:46
-
-
Save sseidenthal/2db2ff121f461f7e254b8d0ca5160adb to your computer and use it in GitHub Desktop.
unison-sync-status.1s.sh
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 | |
# | |
# <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