mozautoconf() { cd $(hg root) autoconf-2.13 && cd js/src && autoconf-2.13 && cd ../.. cd obj && ../configure } def_colors() { # ANSI color codes. # 0-7 == black, red, ... white # 3_ = set foreground color # 4_ = set background color ansi_black=$(echo -e "\E[30m") ansi_red=$(echo -e "\E[31m") ansi_green=$(echo -e "\E[32m") ansi_yellow=$(echo -e "\E[33m") ansi_blue=$(echo -e "\E[34m") ansi_magenta=$(echo -e "\E[35m") ansi_cyan=$(echo -e "\E[36m") ansi_white=$(echo -e "\E[37m") # make colors brighter ansi_bright=$(echo -e "\E[1m") # return to terminal default ansi_reset=$(echo -e "\E[0m") } pymake() { def_colors python -O $(cd $(hg root) && pwd)/build/pymake/make.py "$@" 2>&1 | sed -r \ -e "s/(TEST-UNEXPECTED-[A-Z]+.*)$/$ansi_bright$ansi_red\1$ansi_reset/" \ -e "s/(TEST-PASS)/$ansi_green\1$ansi_reset/" \ -e "s/(TEST-INFO)/$ansi_cyan\1$ansi_reset/" \ -e "s/( .+config\/nsinstall\.(exe|py))(.+)/\1$ansi_blue\3$ansi_reset/" \ -e "s/(Entering directory )(.+)/\1$ansi_cyan\2$ansi_reset/" \ -e "s/(Leaving directory .+)/$ansi_bright$ansi_black\1$ansi_reset/" \ -e "s/(.+ \: )(warning .+)/\1$ansi_yellow\1$ansi_bright\2$ansi_reset/" \ -e "s/(.+ \: )(error .+)/\1$ansi_red\1$ansi_bright\2$ansi_reset/" return ${PIPESTATUS[0]} }