18 lines
413 B
Bash
Executable file
18 lines
413 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
EXPR_MSG="evaluating derivation"
|
|
PROP_MSG="of derivation"
|
|
|
|
LOC=$1
|
|
if [ -z $1 ]; then
|
|
exec {1}<>"$LOC"
|
|
fi
|
|
|
|
ERROR_LINE=$(<$LOC grep -nF "error:" \
|
|
| tail -n1 \
|
|
| awk '{print substr($1,1,length($1)-1)}' )
|
|
<$LOC sed -n "$ERROR_LINE,\$p"
|
|
|
|
echo "[*] Reason:"
|
|
<$LOC grep "evaluating attribute '.*' of derivation" \
|
|
| awk '{ print substr($NF, 2, length($NF)-2), substr($5, 2, length($5)-2)}'
|