summaryrefslogtreecommitdiffstats
path: root/root/linux/dist.sh
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-07-18 20:33:02 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2023-07-18 20:33:02 +0200
commitfd90786031e2f0c3dd8df45325bfaed8ddd4bd69 (patch)
tree5f7889b16b43f032f7d3bdbf527435e209c56eae /root/linux/dist.sh
parentc (diff)
parentMerge branch 'master' of ssh://ni/var/lib/git/sijanec/n (diff)
downloadn-fd90786031e2f0c3dd8df45325bfaed8ddd4bd69.tar
n-fd90786031e2f0c3dd8df45325bfaed8ddd4bd69.tar.gz
n-fd90786031e2f0c3dd8df45325bfaed8ddd4bd69.tar.bz2
n-fd90786031e2f0c3dd8df45325bfaed8ddd4bd69.tar.lz
n-fd90786031e2f0c3dd8df45325bfaed8ddd4bd69.tar.xz
n-fd90786031e2f0c3dd8df45325bfaed8ddd4bd69.tar.zst
n-fd90786031e2f0c3dd8df45325bfaed8ddd4bd69.zip
Diffstat (limited to 'root/linux/dist.sh')
-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