diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-05-29 15:22:22 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-05-29 15:22:22 +0100 |
commit | 56eea501412d320a99840356a00cf072c41ee225 (patch) | |
tree | 78b6e39e94c395445a41dcdde408562575d21cb2 | |
parent | Enable ccache (diff) | |
download | util-56eea501412d320a99840356a00cf072c41ee225.tar.bz2 util-56eea501412d320a99840356a00cf072c41ee225.tar.xz util-56eea501412d320a99840356a00cf072c41ee225.zip |
Build aliases to function
-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() { |