mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix warning when there's no patches folder
This commit is contained in:
parent
42f8c9dcc1
commit
86f22d1b46
1 changed files with 11 additions and 8 deletions
|
@ -222,15 +222,18 @@ ynh_setup_source () {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Apply patches
|
# Apply patches
|
||||||
local patches_folder=$(realpath $YNH_APP_BASEDIR/sources/patches/)
|
if [ -d "$YNH_APP_BASEDIR/sources/patches/" ]
|
||||||
if (( $(find $patches_folder -type f -name "${source_id}-*.patch" 2> /dev/null | wc --lines) > "0" ))
|
|
||||||
then
|
then
|
||||||
(cd "$dest_dir"
|
local patches_folder=$(realpath $YNH_APP_BASEDIR/sources/patches/)
|
||||||
for p in $patches_folder/${source_id}-*.patch
|
if (( $(find $patches_folder -type f -name "${source_id}-*.patch" 2> /dev/null | wc --lines) > "0" ))
|
||||||
do
|
then
|
||||||
echo $p
|
(cd "$dest_dir"
|
||||||
patch --strip=1 < $p
|
for p in $patches_folder/${source_id}-*.patch
|
||||||
done) || ynh_die --message="Unable to apply patches"
|
do
|
||||||
|
echo $p
|
||||||
|
patch --strip=1 < $p
|
||||||
|
done) || ynh_die --message="Unable to apply patches"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add supplementary files
|
# Add supplementary files
|
||||||
|
|
Loading…
Add table
Reference in a new issue