diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2023-07-18 20:33:02 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2023-07-18 20:33:02 +0200 |
commit | fd90786031e2f0c3dd8df45325bfaed8ddd4bd69 (patch) | |
tree | 5f7889b16b43f032f7d3bdbf527435e209c56eae /root/linux/dist.sh | |
parent | c (diff) | |
parent | Merge branch 'master' of ssh://ni/var/lib/git/sijanec/n (diff) | |
download | n-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-x | root/linux/dist.sh | 12 |
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 |