diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-12-23 22:25:19 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2013-05-07 19:17:46 +0200 |
commit | 601aab2477f5cb6fc3298216625b9804d6a18dad (patch) | |
tree | 365091c9faaff0d4bb6d8ca0180b80c20472d096 /mkinitcpio | |
parent | d662258b8769af81a036b7d4cd0af0a66e33dbb2 (diff) | |
download | mkinitcpio-601aab2477f5cb6fc3298216625b9804d6a18dad.tar.gz mkinitcpio-601aab2477f5cb6fc3298216625b9804d6a18dad.tar.xz |
remove "arbitrary" limit from index_of()
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'mkinitcpio')
-rwxr-xr-x | mkinitcpio | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -135,7 +135,7 @@ hook_help() { } hook_list() { - local n p hook resolved + local p hook resolved local -a paths hooklist depr local ss_ordinals=(¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹) @@ -156,16 +156,13 @@ hook_list() { resolved=${resolved##*/} - index_of "$resolved" "${depr[@]}" - - n=$? - if (( n == 255 )); then + if ! index_of "$resolved" "${depr[@]}"; then # deprecated hook depr+=("$resolved") - n=$(( ${#depr[*]} - 1 )) + _idx=$(( ${#depr[*]} - 1 )) fi - hook=$hook${ss_ordinals[n]} + hook+=${ss_ordinals[_idx]} fi hooklist+=("${hook##*/}") |