Improvements

This commit is contained in:
Christopher Vagnetoft
2016-04-19 22:55:09 +02:00
parent fceb4c4966
commit b63260533f
12 changed files with 101 additions and 13 deletions

16
src/stubs/bash.stub Normal file
View File

@ -0,0 +1,16 @@
test -e /etc/lsb-release && source /etc/lsb-release
function exec() {
echo -e "\e[36;1m[exec]\e[36;21m $*\e[0m"
LOG=$(tempfile -p exec)
$@ &>$LOG
EC=$?
if [ $EC -gt 0 ]; then
echo -e "\e[31;1m[warn]\e[31;21m Command completed with exitcode $EC\e[0m"
cat $LOG
fi
rm $LOG
}
function info() {
echo -e "\e[32;1m[info]\e[32;21m $*\e[0m"
}