diff options
-rw-r--r-- | bashrc | 27 |
1 files changed, 25 insertions, 2 deletions
@@ -48,8 +48,31 @@ alias ChuckNorris="sudo" alias l="/bin/ls -lhvF --color" alias grep="/bin/grep -I --color=auto --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.svn --exclude-dir=bin --exclude=tags --exclude-dir=docs/html" alias emerge-state='watch "( ps -fC sandbox ; tail /var/log/emerge.log /var/tmp/portage/*/*/temp/build.log 2> /dev/null )"' -alias build='b2 -j$CORES $TARGET' -alias autobuild="build ; while inotifywait -qr . --exclude '/bin/|\.sw.|/\.git/' -e modify ; do clear ; printf '\e[3J' ; build ; done" +title() { + echo -ne "\033]0;$@\007" +} +build() { + title "Build in progress" + CCACHE_BASEDIR=$(git root) nice -n5 b2 -j$CORES $@ + rtn=$? + if [ $rtn -eq 0 ]; then + title "Build success ${PWD/#$HOME/\~}" + else + title "Build failed ${PWD/#$HOME/\~}" + fi + return $rtn +} +onchange() { + $@ + while inotifywait -qr . --exclude '/bin/|\.sw.|/target/|/\.git/|\.gcov' -e modify ; do + clear + printf '\e[3J' + $@ + done +} +autobuild() { + onchange build $@ +} # CVS export CVSROOT=":pserver:danielg@hawking.howden.press.net:/usr/local/src/CVS_SOURCE_TREE" cvsd() { |