mirror of
https://github.com/YunoHost-Apps/diagramsnet_ynh.git
synced 2024-09-03 18:26:33 +02:00
Fix updater
This commit is contained in:
parent
336b5ae067
commit
322db937ec
1 changed files with 2 additions and 9 deletions
11
.github/workflows/updater.sh
vendored
11
.github/workflows/updater.sh
vendored
|
@ -69,26 +69,19 @@ src="app"
|
|||
tempdir="$(mktemp -d)"
|
||||
|
||||
# Download sources and calculate checksum
|
||||
filename=${asset_url##*/}
|
||||
filename="temp.tar.gz"
|
||||
curl --silent -4 -L $asset_url -o "$tempdir/$filename"
|
||||
checksum=$(sha256sum "$tempdir/$filename" | head -c 64)
|
||||
|
||||
# Delete temporary directory
|
||||
rm -rf $tempdir
|
||||
|
||||
# Get extension
|
||||
if [[ $filename == *.tar.gz ]]; then
|
||||
extension=tar.gz
|
||||
else
|
||||
extension=${filename##*.}
|
||||
fi
|
||||
|
||||
# Rewrite source file
|
||||
cat <<EOT > conf/$src.src
|
||||
SOURCE_URL=$asset_url
|
||||
SOURCE_SUM=$checksum
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=$extension
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=
|
||||
EOT
|
||||
|
|
Loading…
Reference in a new issue