summaryrefslogtreecommitdiff
path: root/upgrade-gentoo
blob: 853a7c4d81568fc7f5718c0861d6b21dbdde006c (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
#!/bin/zsh

if grep -qs '/media/ext_sd' /proc/mounts; then
  mount -o remount,exec,nouser,nousers /media/ext_sd
  mkdir /media/ext_sd/tmp
  chmod 777 /media/ext_sd/tmp
else
  echo "External disk not mounted, exiting."
  exit
fi
cd /usr
rsync -avv portage/ portage_/
umount portage
rm portage.squashfs
mv portage_ portage
perl-cleaner --reallyall
python-updater
emaint --check all
emaint --fix all
emerge --sync
emerge -avuDN --with-bdeps y --keep-going world
echo "-------------------------"
read p\?"press enter to continue... "
etc-update
emerge -av --depclean
revdep-rebuild
eclean -d distfiles
localepurge
mksquashfs portage portage.squashfs -comp xz
rm -rf /usr/portage
mkdir /usr/portage
mount portage
rm -r /media/ext_sd/tmp
mount -o remount,users,auto /media/ext_sd