summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2021-05-27 07:46:28 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2021-05-27 07:46:28 -0400
commit4ca8ff7de700e1ca366ed188a2ed36ce9941817d (patch)
tree0e13efc37d8045107afe58209ced5ebb9d676706
parentd127365cfac07dff8af75efbed95901d9ff6c0bc (diff)
downloadsysupdate-master.tar.xz
sysupdate-master.zip
-rwxr-xr-xkernel27
-rwxr-xr-xportage20
2 files changed, 23 insertions, 24 deletions
diff --git a/kernel b/kernel
index 0f0ab57..c5b2cea 100755
--- a/kernel
+++ b/kernel
@@ -15,10 +15,10 @@ kernelrelease=$(make -s kernelrelease)
bas=/boot/vmlinuz
new=$bas.new
ins=$bas-${kernelrelease}
-cmd sudo cp arch/x86/boot/bzImage "$new"
-cmd sudo mv "$new" "$ins"
+cmd doas cp arch/x86/boot/bzImage "$new"
+cmd doas mv "$new" "$ins"
loader_entry=linux-${kernelrelease}
-cmd sudo sh -c "cat > /boot/loader/entries/$loader_entry.conf << EOF
+cmd doas sh -c "cat > /boot/loader/entries/$loader_entry.conf << EOF
title Linux
version ${kernelrelease}
linux /vmlinuz-${kernelrelease}
@@ -26,19 +26,18 @@ options libahci.ignore_sss=1 vfio-pci.ids=1002:aaf0 amdgpu.ppfeaturemask=0xfffff
initrd /amd-uc.img
initrd /initramfs.img
EOF"
-cmd sudo bootctl set-default $loader_entry.conf
+cmd doas bootctl set-default $loader_entry.conf
-cmd sudo rm -rf /lib/modules/$kernelrelease
-cmd sudo make modules_install
+cmd doas rm -rf /lib/modules/$kernelrelease
+cmd doas make modules_install
builddir=/lib/modules/$kernelrelease/build
-cmd sudo rm -rf "$builddir"
-cmd sudo install -Dt "$builddir" -m644 .config
-cmd sudo install -Dt "$builddir" -m644 $HOME/linux/Makefile
-cmd sudo sh -c "xz -9c vmlinux > '$builddir/vmlinux.xz'"
-cmd sudo sh -c "xz -9c System.map > '$builddir/System.map.xz'"
-cmd sudo rm -f /usr/src/linux
-cmd sudo ln -sr "$builddir" /usr/src/linux
+cmd doas rm -rf "$builddir"
+cmd doas install -Dt "$builddir" -m644 .config
+cmd doas install -Dt "$builddir" -m644 $HOME/linux/Makefile
+cmd doas sh -c "xz -9c vmlinux > '$builddir/vmlinux.xz'"
+cmd doas sh -c "xz -9c System.map > '$builddir/System.map.xz'"
+cmd doas rm -f /usr/src/linux
+cmd doas ln -sr "$builddir" /usr/src/linux
cd /
cmd rm -rf /tmp/linux-build
-#sudo emerge -1 --ask=n --usepkg=n @module-rebuild
diff --git a/portage b/portage
index 5464937..7b83081 100755
--- a/portage
+++ b/portage
@@ -27,25 +27,25 @@ if [ "$1" != -p ]; then
if [ -n "$stashed" ]; then
cmd git stash pop
fi
- cmd sudo emerge --sync
+ cmd doas emerge --sync
for f in /etc/portage/repo.postsync.d/*; do
if [ -x "$f" ]; then
cmd "$f" gentoo "" /usr/portage
fi
done
cmd mv /var/cache/eix/portage.eix /var/cache/eix/previous.eix
- cmd sudo eix-update
- cmd sudo eix-diff
+ cmd doas eix-update
+ cmd doas eix-diff
fi
if [ "$(eselect news count)" != 0 ]; then
- cmd sudo eselect news read
+ cmd doas eselect news read
printf 'Press enter to continue...\n'
read REPLY
fi
-cmd sudo emerge -uD --changed-use @world
-cmd sudo smart-live-rebuild -- --usepkg=n
+cmd doas emerge -uD --changed-use @world
+cmd doas smart-live-rebuild -- --usepkg=n
# needs --usepkg-exclude
-#cmd sudo emerge @preserved-rebuild
-cmd sudo dispatch-conf
-cmd sudo emerge --depclean --deep --verbose=n
-cmd sudo revdep-rebuild --ignore --verbose -- --usepkg=n
+#cmd doas emerge @preserved-rebuild
+cmd doas dispatch-conf
+cmd doas emerge --depclean --deep --verbose=n
+cmd doas revdep-rebuild --ignore --verbose -- --usepkg=n