blob: e7be3e389638733a1022f90863d784078e4f970b (
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
43
|
#!/bin/zsh
HOST=$(hostname)
if [[ $HOST == "bogues" ]]; then
if grep -qs '/media/ext_sd' /proc/mounts; then
sudo mount -o remount,exec,nouser,nousers /media/ext_sd
sudo mkdir -p /media/ext_sd/tmp
sudo chmod 777 /media/ext_sd/tmp
else
echo "External disk not mounted, exiting."
exit
fi
cd /usr
sudo rsync -avv portage/ portage_/
sudo umount portage
sudo rm portage.squashfs
sudo mv portage_ portage
fi
sudo perl-cleaner --reallyall
sudo emaint --check all
sudo emaint --fix all
sudo emerge --sync
sudo emerge -avuDN --with-bdeps y --keep-going world
echo "-------------------------"
read p\?"press enter to continue... "
sudo etc-update
sudo emerge -av --depclean
sudo revdep-rebuild
sudo emerge @preserved-rebuild
sudo eclean -d distfiles
sudo localepurge
if [[ $HOST == "bogues" ]]; then
sudo mksquashfs portage portage.squashfs -comp xz
sudo rm -rf /usr/portage
sudo mkdir /usr/portage
sudo mount portage
sudo rm -r /media/ext_sd/tmp
sudo mount -o remount,users,auto /media/ext_sd
fi
|