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)"
|
tempdir="$(mktemp -d)"
|
||||||
|
|
||||||
# Download sources and calculate checksum
|
# Download sources and calculate checksum
|
||||||
filename=${asset_url##*/}
|
filename="temp.tar.gz"
|
||||||
curl --silent -4 -L $asset_url -o "$tempdir/$filename"
|
curl --silent -4 -L $asset_url -o "$tempdir/$filename"
|
||||||
checksum=$(sha256sum "$tempdir/$filename" | head -c 64)
|
checksum=$(sha256sum "$tempdir/$filename" | head -c 64)
|
||||||
|
|
||||||
# Delete temporary directory
|
# Delete temporary directory
|
||||||
rm -rf $tempdir
|
rm -rf $tempdir
|
||||||
|
|
||||||
# Get extension
|
|
||||||
if [[ $filename == *.tar.gz ]]; then
|
|
||||||
extension=tar.gz
|
|
||||||
else
|
|
||||||
extension=${filename##*.}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Rewrite source file
|
# Rewrite source file
|
||||||
cat <<EOT > conf/$src.src
|
cat <<EOT > conf/$src.src
|
||||||
SOURCE_URL=$asset_url
|
SOURCE_URL=$asset_url
|
||||||
SOURCE_SUM=$checksum
|
SOURCE_SUM=$checksum
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=$extension
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
SOURCE_FILENAME=
|
SOURCE_FILENAME=
|
||||||
EOT
|
EOT
|
||||||
|
|
Loading…
Reference in a new issue