summaryrefslogtreecommitdiff
path: root/sys-apps/personal-utils/files/emergefix
blob: 400df3c7c822807171e4e46aa179178093568f06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
set -e

PRETEND=false
for arg in "$@"; do
	case "$arg" in
		-p)
			PRETEND=true
			;;
	esac
done

echo -e '\e[1;34m========== Update packages ==========\e[0m'
emerge -auDN --with-bdeps=y @world "$@"

if ! $PRETEND; then
	echo -e '\e[1;34m========== Clean packages ==========\e[0m'
	emerge --depclean -a
	echo -e '\e[1;34m========== Rebuil packages ==========\e[0m'
	revdep-rebuild
fi