summaryrefslogtreecommitdiffstats
path: root/libalpm/scripts/mkinitcpio.script
blob: 70c9784c49aab6bbd8a458039fc1b3895d0c8576 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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[@]}"