diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-11-25 03:21:56 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-11-26 02:08:57 +0100 |
commit | 8155250bcdce4737a0fdb1d3009d9878f61ee324 (patch) | |
tree | 8454ec34f25224e6cdd6085584644c534172da12 /functions | |
parent | 78fb526649cc730d9c20be47112db945a4a8427b (diff) | |
download | mkinitcpio-8155250bcdce4737a0fdb1d3009d9878f61ee324.tar.gz mkinitcpio-8155250bcdce4737a0fdb1d3009d9878f61ee324.tar.xz |
handle deprecation notices in -H and -L
Separate out the printing from these flags to separate functions and
examine each hook more closely, pointing out where it might be
deprecated, and what should be used in place of it.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'functions')
-rw-r--r-- | functions | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -193,6 +193,18 @@ in_array() { return 1 # Not Found } +index_of() { + # get the array index of an item. size limit of 254 items! + local item=$1; shift + + for (( i=1; i <= $#; i++ )); do + [[ $item = ${!i} ]] && return $(( --i )) + done + + # not found + return 255 +} + funcgrep() { awk -v funcmatch="$1" ' /^[[:space:]]*[[:alnum:]_]+[[:space:]]*\([[:space:]]*\)/ { |