gitclone: check for invalid patch filename

where the asterisk is used, it can sometimes
literally try to patch with a file named "*",
which of course does not exist

this change fixes an lbmk error when running:

./download seabios

this was caused recently, because all patches
were seabios were removed (lbmk currently uses
stock seabios, without patching it)
fsdg20230625
Leah Rowe 2023-05-14 11:33:50 +01:00
parent db3c1d9ccf
commit d89585fb71
1 changed files with 3 additions and 0 deletions

View File

@ -35,6 +35,9 @@ Check_vars(){
Patch(){ Patch(){
for patchfile in ${PWD}/${patchdir}/*.patch ; do for patchfile in ${PWD}/${patchdir}/*.patch ; do
if [ ! -f "${patchfile}" ]; then
continue
fi
( cd ${tmp_dir} ( cd ${tmp_dir}
git am ${patchfile} || return 1 git am ${patchfile} || return 1
) )