summaryrefslogtreecommitdiff
path: root/include/git.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-10-20 09:11:29 +0100
committerLeah Rowe <leah@libreboot.org>2023-10-20 09:11:29 +0100
commit31b35bb4ceb785a5649d25d7fcf68c93da82bcde (patch)
treef80cd7d9a25850a9ab62d2e66a5e425a375a1a11 /include/git.sh
parentbaa3d4f217863ff34c03d54c4014f53812ae12ec (diff)
include/git: fix error caused by sh idiosyncrasy
when [] is used right at the end of a function, or certain loops/subshells, some sh implementations will just return a non-zero exit Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/git.sh')
-rwxr-xr-xinclude/git.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/git.sh b/include/git.sh
index 7f4b1f40..a6ce1cbf 100755
--- a/include/git.sh
+++ b/include/git.sh
@@ -141,6 +141,7 @@ git_am_patches()
)
for patches in "${patchdir}/"*; do
[ -L "${patches}" ] && continue
- [ -d "${patches}" ] && git_am_patches "${sdir}" "${patches}"
+ [ ! -d "${patches}" ] && continue
+ git_am_patches "${sdir}" "${patches}"
done
}