summaryrefslogtreecommitdiffstats
path: root/root/linux
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-07-18 19:59:22 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2023-07-18 19:59:22 +0200
commit8437ede36fe4a3c2921bd6ec86e8b748137054b5 (patch)
treece223ca62bab665f2a5dc1b0de2b15c0b69072d5 /root/linux
parentb (diff)
downloadn-8437ede36fe4a3c2921bd6ec86e8b748137054b5.tar
n-8437ede36fe4a3c2921bd6ec86e8b748137054b5.tar.gz
n-8437ede36fe4a3c2921bd6ec86e8b748137054b5.tar.bz2
n-8437ede36fe4a3c2921bd6ec86e8b748137054b5.tar.lz
n-8437ede36fe4a3c2921bd6ec86e8b748137054b5.tar.xz
n-8437ede36fe4a3c2921bd6ec86e8b748137054b5.tar.zst
n-8437ede36fe4a3c2921bd6ec86e8b748137054b5.zip
Diffstat (limited to 'root/linux')
-rwxr-xr-xroot/linux/dist.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/root/linux/dist.sh b/root/linux/dist.sh
new file mode 100755
index 0000000..e4d3b23
--- /dev/null
+++ b/root/linux/dist.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -xe
+k=`eselect kernel list | tail -n1 | cut -d\ -f6`
+m=`cut -d- -f2- <<<$k`
+p=`rev <<<$0 | cut -d/ -f1 | rev`
+d=`mktemp -d -p "" $p.XXX`
+pushd $d
+dracut $m
+mv $m /boot/initramfs-$m.img
+grub-mkconfig -o /boot/grub/grub.cfg
+popd
+rm -fr $d