summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libalpm/scripts/mkinitcpio.script14
1 files changed, 14 insertions, 0 deletions
diff --git a/libalpm/scripts/mkinitcpio.script b/libalpm/scripts/mkinitcpio.script
new file mode 100644
index 0000000..70c9784
--- /dev/null
+++ b/libalpm/scripts/mkinitcpio.script
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+args=('-p')
+
+while read -r line; do
+ if [[ $line = usr/lib/modules/+([^/])/pkgbase ]]; then
+ mapfile -O ${#targets[@]} -t targets < "/$line"
+ else
+ args=('-P') # all presets
+ break
+ fi
+done
+
+mkinitcpio "${args[@]}" "${targets[@]}"