summaryrefslogtreecommitdiff
path: root/virtual/miller-base/files/update-install2
blob: 1dfdcaa1c8b616501cd30f3827dc4497add40305 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

[ -s "$PORTAGE_TMPDIR" ] && exec -c /bin/bash -l -c $0
EMERGEEXTRAOPTS=$(portageq envvar EMERGEEXTRAOPTS)
UPDATESTATEDIR=$(portageq envvar UPDATESTATEDIR)
updates="${UPDATESTATEDIR:-/tmp}/`hostname`_updates.txt"
depcleans="${UPDATESTATEDIR:-/tmp}/`hostname`_depclean.txt"

tty -s
TTYTEST=$?
( \
	( \
		( \
			emerge -uqDN @world @system --keep-going --with-bdeps=y ${EMERGEEXTRAOPTS} && \
			rm -f ${updates} ) || \
		/etc/portage/postsync.d/50-write-new-updates ) && \
	emerge --depclean -q 2>&1 | tee ${depcleans} && \
	emerge -q --keep-going @preserved-rebuild ${EMERGEEXTRAOPTS} \
)

/usr/sbin/etc-update --preen
if [ $TTYTEST -eq 0 ]; then
	/usr/sbin/etc-update
fi