summaryrefslogtreecommitdiff
blob: b1ef0c4e267a38760576d24e4d3f9d43b9f3c578 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

if [[ -f /var/log/emerge.log ]]; then
    rm -f /var/log/emerge.log
fi

echo "$1 queued" | bti

emerge --nospinner -1Du --keep-going --selective=n "$1" < /dev/null

res=$?

echo -5 | etc-update

if [[ $res != 0 ]]; then
    if ! fgrep -q ">>> emerge" /var/log/emerge.log; then
	echo "$1 merge #rejected" | bti
    fi
fi

rm -f /var/log/emerge.log