Improvements
This commit is contained in:
16
src/stubs/bash.stub
Normal file
16
src/stubs/bash.stub
Normal 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"
|
||||
}
|
Reference in New Issue
Block a user