diff --git a/scripts/install b/scripts/install index 02168d0..43b446e 100644 --- a/scripts/install +++ b/scripts/install @@ -113,10 +113,14 @@ sudo yunohost app setting $app mysqlpwd -v $db_pwd sudo mkdir "$final_path" sudo yunohost app setting $app final_path -v $final_path +# Télécharge la source +wget -nv --show-progress -i ../sources/source_url -O leed.tar.gz +# Vérifie la somme de contrôle de la source téléchargée. +md5sum -c ../sources/source_md5 --status || (echo "Corrupt source" && false) # Décompresse la source -tar -x -f ../sources/leed.tar.gz +tar -x -f leed.tar.gz # Copie les fichiers sources -sudo cp -a leed/. "$final_path" +sudo cp -a $(cat ../sources/source_dir)/. "$final_path" # Copie les fichiers additionnels ou modifiés. # sudo cp -a ../sources/ajouts/. "$final_path" # Et copie le fichier de config nginx diff --git a/scripts/upgrade b/scripts/upgrade index 1905f9b..77d828d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -13,10 +13,14 @@ admin=$(sudo yunohost app setting $app admin) is_public=$(sudo yunohost app setting $app is_public) +# Télécharge la source +wget -nv --show-progress -i ../sources/source_url -O leed.tar.gz +# Vérifie la somme de contrôle de la source téléchargée. +md5sum -c ../sources/source_md5 --status || (echo "Corrupt source" && false) # Décompresse la source -tar -x -f ../sources/leed.tar.gz +tar -x -f leed.tar.gz # Copie les fichiers sources -sudo cp -a leed/. "$final_path" +sudo cp -a $(cat ../sources/source_dir)/. "$final_path" # Copie les fichiers additionnels ou modifiés. # sudo cp -a ../sources/ajouts/. "$final_path" # Et copie le fichier de config nginx diff --git a/sources/leed.tar.gz b/sources/leed.tar.gz deleted file mode 100644 index cbe3490..0000000 Binary files a/sources/leed.tar.gz and /dev/null differ diff --git a/sources/source_dir b/sources/source_dir new file mode 100644 index 0000000..b4085d3 --- /dev/null +++ b/sources/source_dir @@ -0,0 +1 @@ +Leed-1.7 \ No newline at end of file diff --git a/sources/source_md5 b/sources/source_md5 new file mode 100644 index 0000000..8fd724b --- /dev/null +++ b/sources/source_md5 @@ -0,0 +1 @@ +f54a18cef71704be85e7b963cff19357 leed.tar.gz \ No newline at end of file diff --git a/sources/source_url b/sources/source_url new file mode 100644 index 0000000..a8cbbff --- /dev/null +++ b/sources/source_url @@ -0,0 +1 @@ +https://github.com/ldleman/Leed/archive/v1.7.tar.gz \ No newline at end of file