mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-21 07:42:55 +01:00
24 lines
569 B
Bash
Executable file
24 lines
569 B
Bash
Executable file
#!/bin/sh
|
|
|
|
##adjust /usr/src/linux link if we are pretty sure we won't screw up the system
|
|
KV=$(uname -r)
|
|
if [ -d /usr/src/linux-${KV} ] && $(qfile /usr/src/linux-${KV} 2>&1 > /dev/null)
|
|
then
|
|
if [ -L /usr/src/linux ]
|
|
then
|
|
unlink /usr/src/linux
|
|
fi
|
|
ln -s /usr/src/linux-${KV} /usr/src/linux
|
|
|
|
if [ -L /lib/modules/${KV}/build ]
|
|
then
|
|
unlink /lib/modules/${KV}/build
|
|
fi
|
|
ln -s /usr/src/linux-${KV} /lib/modules/${KV}/build
|
|
|
|
if [ -L /lib/modules/${KV}/source ]
|
|
then
|
|
unlink /lib/modules/${KV}/source
|
|
fi
|
|
ln -s /usr/src/linux-${KV} /lib/modules/${KV}/source
|
|
fi
|