diff options
author | Dave Reisner <dreisner@archlinux.org> | 2014-08-04 14:31:37 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2014-08-04 21:24:00 +0200 |
commit | ea4c4154205372154457c794513ae46b61ea4e4c (patch) | |
tree | b1ae3a4b0f41894cf350244717a8553b19e2f9c6 | |
parent | a35c698c16759c3c05c692fd10f140d186053177 (diff) | |
download | mkinitcpio-ea4c4154205372154457c794513ae46b61ea4e4c.tar.gz mkinitcpio-ea4c4154205372154457c794513ae46b61ea4e4c.tar.xz |
avoid compound conditional leading to spurious "errors"
As seen:
https://bbs.archlinux.org/viewtopic.php?id=185204
https://bbs.archlinux.org/viewtopic.php?id=185265
-rw-r--r-- | functions | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -423,11 +423,15 @@ add_full_dir() { for f in "$1"/*; do if [[ -L $f ]]; then - [[ $f = $filter ]] && add_symlink "$f" "$(readlink "$f")" + if [[ $f = $filter ]]; then + add_symlink "$f" "$(readlink "$f")" + fi elif [[ -d $f ]]; then add_full_dir "$f" elif [[ -f $f ]]; then - [[ $f = $filter ]] && add_file "$f" + if [[ $f = $filter ]]; then + add_file "$f" + fi fi done fi |