Automatically detect kernel version and add to variable.
This commit is contained in:
parent
2f1e1a3f2f
commit
6cf60b4ed1
@ -6,12 +6,16 @@
|
|||||||
# Copyright 2023 Inference
|
# Copyright 2023 Inference
|
||||||
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||||
|
|
||||||
# Version: 0.1.0.6
|
# Version: 1.0.0.7
|
||||||
|
|
||||||
|
|
||||||
echo "Enter kernel version:"
|
major=$(cat Makefile | grep "VERSION = " | sed 's/VERSION = //g')
|
||||||
read KVER
|
minor=$(cat Makefile | grep "PATCHLEVEL = " | sed 's/PATCHLEVEL = //g')
|
||||||
echo ""
|
patch=$(cat Makefile | grep "SUBLEVEL = " | sed 's/SUBLEVEL = //g')
|
||||||
|
localversion=$(cat config | grep "CONFIG_LOCALVERSION=" | sed 's/CONFIG_LOCALVERSION="//g' | sed 's/"//g')
|
||||||
|
|
||||||
|
KVER=$major.$minor.$patch$localversion
|
||||||
|
|
||||||
|
|
||||||
doas zsh -c\
|
doas zsh -c\
|
||||||
"mount /dev/nvme0n1p1 /boot/ &&\
|
"mount /dev/nvme0n1p1 /boot/ &&\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user