Fix warning when there's no patches folder

This commit is contained in:
Alexandre Aubin 2021-04-05 18:39:08 +02:00
parent 42f8c9dcc1
commit 86f22d1b46

View file

@ -222,6 +222,8 @@ ynh_setup_source () {
fi
# Apply patches
if [ -d "$YNH_APP_BASEDIR/sources/patches/" ]
then
local patches_folder=$(realpath $YNH_APP_BASEDIR/sources/patches/)
if (( $(find $patches_folder -type f -name "${source_id}-*.patch" 2> /dev/null | wc --lines) > "0" ))
then
@ -232,6 +234,7 @@ ynh_setup_source () {
patch --strip=1 < $p
done) || ynh_die --message="Unable to apply patches"
fi
fi
# Add supplementary files
if test -e "$YNH_APP_BASEDIR/sources/extra_files/${source_id}"; then