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

Fix auto-updater script

This commit is contained in:
tituspijean 2021-10-22 20:16:20 +02:00
parent f08329e5ad
commit 52eee0a7fa
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720

View file

@ -71,8 +71,8 @@ if [ ! -z "$src" ]; then
tempdir="$(mktemp -d)"
# Download sources and calculate checksum
filename=${DOWNLOAD_URL##*/}
curl --silent -4 -L $DOWNLOAD_URL -o "$tempdir/$filename"
filename=${asset_url##*/}
curl --silent -4 -L $asset_url -o "$tempdir/$filename"
checksum=$(sha256sum "$tempdir/$filename" | head -c 64)
# Delete temporary directory
@ -87,7 +87,7 @@ fi
# Rewrite source file
cat <<EOT > conf/$src.src
SOURCE_URL=$DOWNLOAD_URL
SOURCE_URL=$asset_url
SOURCE_SUM=$checksum
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=$extension
@ -113,11 +113,8 @@ done
# GENERIC FINALIZATION
#=================================================
# Install moreutils, needed for sponge
sudo apt-get install moreutils
# Replace new version in manifest
jq -s --indent 4 ".[] | .version = \"$VERSION~ynh1\"" manifest.json | sponge manifest.json
echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json
# No need to update the README, yunohost-bot takes care of it