Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # HandbrakeCLIStatusUpdater.sh
- #
- #
- # Created by Andreas Heiberg on 6/1/11.
- # Copyright 2011 Andreas Heiberg. All rights reserved.
- #Change this to path of your .log file
- LOG="/Users/Andreas/Library/Logs/HandbrakeCLI.log"
- #Change this to path of your Alfred settings folder
- SETTINGSFOLDER="/Users/Andreas/Desktop/Alfred/"
- #Change this to the keyword you have given to the script in Alfred
- NAME="transcode"
- #while true
- #do
- #Gets the last/most resent line from the log
- TAIL=$(tail -1 "$LOG")
- #Romoves all parentheses from the string for syntax reasons
- TAIL2=${TAIL//[()]/}
- #Writes the latest log line to the main scripts plist file, so alfred will now show progress
- defaults write "$SETTINGSFOLDER"extensions/scripts/"$NAME"/info subtitle "$TAIL2"
- #done
Add Comment
Please, Sign In to add comment