1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/zwave-js-ui_ynh.git synced 2024-09-03 18:06:00 +02:00

handle app.src update

This commit is contained in:
Krakinou 2022-12-17 14:21:12 +01:00
parent 3e40d55c4c
commit d6bc23e67a

View file

@ -61,9 +61,9 @@ echo "Handling asset at $asset_url"
# src="" # src=""
# ;; # ;;
#esac #esac
#There should be only one asset in the zipball directory #There should be only one asset in the zipball directory and it is a zip file
src="app" src="app"
extension="zip"
# If $src is not empty, let's process the asset # If $src is not empty, let's process the asset
if [ ! -z "$src" ]; then if [ ! -z "$src" ]; then
@ -79,20 +79,20 @@ checksum=$(sha256sum "$tempdir/$filename" | head -c 64)
rm -rf $tempdir rm -rf $tempdir
# Get extension # Get extension
if [[ $filename == *.tar.gz ]]; then #if [[ $filename == *.tar.gz ]]; then
extension=tar.gz # extension=tar.gz
else #else
extension=${filename##*.} # extension=${filename##*.}
fi #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.$extension
SOURCE_SUM=$checksum SOURCE_SUM=$checksum
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=$extension SOURCE_FORMAT=$extension
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true
SOURCE_FILENAME= SOURCE_EXTRACT=true
EOT EOT
echo "... conf/$src.src updated" echo "... conf/$src.src updated"