summaryrefslogtreecommitdiff
path: root/upgrade-gentoo
blob: 548f34e01133a9219ef70e90dccd43237eeb0a4f (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/zsh

HOST=$(hostname)

source $(dirname $0)/func.zsh

check_root

if [[ $HOST == "bogues" ]]; then
  # when using squashfs
  #rsync -avv /usr/portage/ /usr/portage_/
  #umount /usr/portage
  #rm -f /usr/portage.squashfs
  #rmdir /usr/portage
  #mv /usr/portage_ /usr/portage
fi

emaint --check all
emaint --fix all
emerge --sync
if [[ -e $(which layman) ]]; then
  layman -s SYNC ALL
fi
emerge --oneshot portage
emerge --newuse -avuDN --with-bdeps y --keep-going world
echo "-------------------------"
read p\?"press enter to continue... "
etc-update
emerge -av --depclean
perl-cleaner --reallyall
revdep-rebuild
emerge @preserved-rebuild
eclean -d distfiles

if [[ $HOST == "bogues" ]]; then
  # when using squashfs
  #mksquashfs /usr/portage /usr/portage.squashfs -comp xz
  #rm -rf /usr/portage
  #mkdir /usr/portage
  #mount /usr/portage
fi