17 lines
383 B
Plaintext
17 lines
383 B
Plaintext
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"
|
|
}
|