mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
33 lines
470 B
Bash
33 lines
470 B
Bash
|
aa_action() {
|
||
|
STRING=$1
|
||
|
shift
|
||
|
$*
|
||
|
rc=$?
|
||
|
if [ $rc -eq 0 ] ; then
|
||
|
aa_log_success_msg $"$STRING "
|
||
|
else
|
||
|
aa_log_failure_msg $"$STRING "
|
||
|
fi
|
||
|
return $rc
|
||
|
}
|
||
|
|
||
|
aa_log_success_msg() {
|
||
|
[ -n "$1" ] && echo -n $1
|
||
|
echo ": done."
|
||
|
}
|
||
|
|
||
|
aa_log_warning_msg() {
|
||
|
[ -n "$1" ] && echo -n $1
|
||
|
echo ": Warning."
|
||
|
}
|
||
|
|
||
|
aa_log_failure_msg() {
|
||
|
[ -n "$1" ] && echo -n $1
|
||
|
echo ": Failed."
|
||
|
}
|
||
|
|
||
|
aa_log_skipped_msg() {
|
||
|
[ -n "$1" ] && echo -n $1
|
||
|
echo ": Skipped."
|
||
|
}
|