diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-04-22 04:32:56 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-04-22 05:43:52 +0200 |
commit | 710650c0bfdfed3423d0c17bb7955d4dc1151b25 (patch) | |
tree | 3742bd47814929029e4de2cf4192ee16186e123b | |
parent | b5cd0b31a03772056137db8246b3696844843713 (diff) | |
download | mkinitcpio-710650c0bfdfed3423d0c17bb7955d4dc1151b25.tar.gz mkinitcpio-710650c0bfdfed3423d0c17bb7955d4dc1151b25.tar.xz |
mkinitcpio: check return of cd before listing hooks
$ mkinitcpio -L
==> Available hooks
/usr/bin/mkinitcpio: line 173: cd: /lib/initcpio/install: No such file or directory
sort and dedupe as well, since we deal with a hierarchy which may (for
some horrible reason) contain duplicates.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-x | mkinitcpio | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -173,8 +173,8 @@ while :; do -L|--listhooks) msg "Available hooks" for dir in "${INSTDIR[@]}"; do - ( cd "$dir" >/dev/null; printf ' %s\n' * ) - done | column -c$(tput cols) + ( cd "$dir" &>/dev/null && printf ' %s\n' * ) + done | sort -u | column -c$(tput cols) exit 0 ;; -M|--automods) SHOW_AUTOMODS=1 ;; |