aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWynn Wolf Arbor2020-06-04 14:31:08 +0200
committerWynn Wolf Arbor2020-06-04 14:31:08 +0200
commit1c5a81df33ddbc0fda4bfb64ae9def531c213743 (patch)
treee007970ad91bda23700a4f15fb97ff76e92a6180
parent6afb134571d36cd5ab6a05a9bf80a18632ff2581 (diff)
downloadkern-1c5a81df33ddbc0fda4bfb64ae9def531c213743.tar.gz
Inline SRCDIR
kern(1) is supposed to be used on Gentoo Linux, and the canonical location for kernels is /usr/src. Until there is an actual need to have the user override this location, remove SRCDIR and inline its contents.
-rwxr-xr-xkern5
1 files changed, 2 insertions, 3 deletions
diff --git a/kern b/kern
index 4809a2c..42f1ac6 100755
--- a/kern
+++ b/kern
@@ -2,7 +2,6 @@
set -e
-SRCDIR=/usr/src
KERNFRAG=${KERNFRAG:-/etc/kernfrag}
err() {
@@ -27,13 +26,13 @@ get_latest_kernel() {
}
get_selected_kernel() {
- readlink "$SRCDIR/linux"
+ readlink /usr/src/linux
}
set_kernel() {
kern=${1:-$(get_latest_kernel)}
selected=$(get_selected_kernel)
- kerndir=$SRCDIR/$kern
+ kerndir=/usr/src/$kern
test -d "$kerndir" || errx "No such file or directory: $kerndir"