mirror of
https://github.com/YunoHost-Apps/dotclear2_ynh.git
synced 2024-09-03 18:26:29 +02:00
check url and change it if not valid
This commit is contained in:
parent
e82418bfb4
commit
5ab8b49bcb
2 changed files with 13 additions and 0 deletions
|
@ -69,6 +69,13 @@ db_pwd=$(ynh_app_setting_get $app mysqlpwd)
|
|||
#=================================================
|
||||
|
||||
ynh_app_setting_set $app final_path $final_path
|
||||
|
||||
# In case of a new version, the url change from http://download.dotclear.org/latest/dotclear-X.X.X.tar.gz to http://download.dotclear.org/attic/dotclear-X.X.X.tar.gz
|
||||
src_url=$(grep 'SOURCE_URL=' "../conf/app.src" | cut -d= -f2-)
|
||||
if ! curl --output /dev/null --silent --head --fail "$src_url"; then
|
||||
ynh_replace_string "latest" "attic" ../conf/app.src
|
||||
fi
|
||||
|
||||
ynh_setup_source $final_path
|
||||
|
||||
mv $final_path/dotclear/* $final_path/
|
||||
|
|
|
@ -88,6 +88,12 @@ ynh_backup_if_checksum_is_different "$php_config"
|
|||
ynh_secure_remove "$final_path"
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
# In case of a new version, the url change from http://download.dotclear.org/latest/dotclear-X.X.X.tar.gz to http://download.dotclear.org/attic/dotclear-X.X.X.tar.gz
|
||||
src_url=$(grep 'SOURCE_URL=' "../conf/app.src" | cut -d= -f2-)
|
||||
if ! curl --output /dev/null --silent --head --fail "$src_url"; then
|
||||
ynh_replace_string "latest" "attic" ../conf/app.src
|
||||
fi
|
||||
|
||||
ynh_setup_source "$final_path"
|
||||
|
||||
mv $final_path/dotclear/* $final_path/
|
||||
|
|
Loading…
Reference in a new issue