1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ghost_ynh.git synced 2024-09-03 19:16:02 +02:00

Add check on number of processed assets in updater.sh

This commit is contained in:
tituspijean 2021-09-29 00:11:05 +02:00
parent e6c351dc8f
commit e92047154e

View file

@ -53,6 +53,8 @@ echo "${#assets[@]} available asset(s)"
# Here we use the $assets variable to get the resources published in the upstream release.
count=0
# Let's loop over the array of assets URLs
for asset_url in ${assets[@]}; do
@ -102,12 +104,19 @@ SOURCE_FILENAME=
EOT
echo "... conf/$src.src updated"
count=$((count+1))
else
echo "... asset ignored"
fi
done
if [ $count == 0 ]; then
echo "::warning ::None of the assets were processed."
exit 0
fi
#=================================================
# SPECIFIC UPDATE STEPS
#=================================================