mkogg.py: Fix 'self.get_mp4_metadata(self, source)'
[blog.git] / posts / conky / emerge-current.sh
1 #!/bin/bash
2 # emerge-current.sh by Hellf[i]re
3 #
4 # This script is designed to read the name of the last package compiled.
5 #
6 # As this script does read the entirety of emerge.log, it will be rather
7 # heavy on the CPU.  It shouldn't be enough to be noticable on newer (2.0Ghz+)
8 # processors, but it still should not be run more often than every 30 seconds.
9 #
10 # Usage:
11 # .conkyrc:     ${execi [time] /path/to/script/emerge-current.sh}
12 #
13 # Usage Example
14 #               ${execi 30 /home/youruser/scripts/emerge-current.sh}
15
16 tac /var/log/emerge.log |\
17 grep 'Compiling' |\
18 head |\
19 sed -e 's/.*(//' |\
20 sed -e 's/::.*)//' |\
21 head -n 1 |\
22 cut -d \) -f 1