aboutsummarylogtreecommitdiffstats
path: root/post-hook
diff options
context:
space:
mode:
authorJonathan Kotta2020-03-14 20:32:25 -0500
committerJonathan Kotta2020-03-14 20:32:25 -0500
commitf5dff153c22dfb3f59cd3d714781bf9c57949e05 (patch)
tree74f14f66e5d9c8e31e86190265d65f3d35f74fd5 /post-hook
downloadaur-f5dff153c22dfb3f59cd3d714781bf9c57949e05.tar.gz
initial commit
Diffstat (limited to 'post-hook')
-rwxr-xr-xpost-hook14
1 files changed, 14 insertions, 0 deletions
diff --git a/post-hook b/post-hook
new file mode 100755
index 000000000000..91fb9cac846b
--- /dev/null
+++ b/post-hook
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+# set -o xtrace
+set -o errexit -o nounset -o pipefail -o errtrace
+IFS=$'\n\t'
+
+cd /usr/lib/modules/saved-kernel-modules
+
+running_kernel=$(uname -r)
+
+if [ -e modules/"$running_kernel" ] \
+ && [ ! -e /usr/lib/modules/"$running_kernel" ] ; then
+ ln -s $PWD/modules/"$running_kernel" /usr/lib/modules/"$running_kernel"
+fi