diff options
author | Patrick Simianer <p@simianer.de> | 2018-10-19 08:33:00 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2018-10-19 08:33:00 +0200 |
commit | cf7179a73d41a705ef072fcee373c23be2366e88 (patch) | |
tree | ee3d8400179ef4a4e6e1653f64f3f64525806d7e | |
parent | c9774efc19c63d93fdd167859834b8efb7855781 (diff) |
upgrade-gentoo: use sudo
-rwxr-xr-x | upgrade-gentoo | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/upgrade-gentoo b/upgrade-gentoo index e26f575..e7be3e3 100755 --- a/upgrade-gentoo +++ b/upgrade-gentoo @@ -4,39 +4,40 @@ HOST=$(hostname) if [[ $HOST == "bogues" ]]; then 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 + 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 - rsync -avv portage/ portage_/ - umount portage - rm portage.squashfs - mv portage_ portage + sudo rsync -avv portage/ portage_/ + sudo umount portage + sudo rm portage.squashfs + sudo mv portage_ portage fi -perl-cleaner --reallyall -emaint --check all -emaint --fix all -emerge --sync -emerge -avuDN --with-bdeps y --keep-going world +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... " -etc-update -emerge -av --depclean -revdep-rebuild -eclean -d distfiles -localepurge +sudo etc-update +sudo emerge -av --depclean +sudo revdep-rebuild +sudo emerge @preserved-rebuild +sudo eclean -d distfiles +sudo localepurge if [[ $HOST == "bogues" ]]; then - 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 + 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 |