1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dotclear2_ynh.git synced 2024-09-03 18:26:29 +02:00

fix ynh_setup_source workaround

This commit is contained in:
Salamandar 2023-12-11 22:19:47 +01:00
parent 1052f09f19
commit e4c3befb53
3 changed files with 14 additions and 3 deletions

View file

@ -8,6 +8,14 @@
# PERSONAL HELPERS
#=================================================
_check_if_source_available() {
source_id=$1
source_url=$(cat "$YNH_APP_BASEDIR/manifest.toml" | toml_to_json | jq ".resources.sources[\"$source_id\"][\"url\"]")
curl --output /dev/null --silent --head --fail "$source_url"
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================

View file

@ -16,7 +16,11 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2
ynh_change_url_nginx_config
if _check_if_source_available main; then
ynh_setup_source --dest_dir="$install_dir" -s main
else
ynh_setup_source --dest_dir="$install_dir" -s main_attic
fi
#=================================================
# SPECIFIC MODIFICATIONS

View file

@ -15,8 +15,7 @@ source /usr/share/yunohost/helpers
ynh_script_progression --message="Setting up source files..." --weight=4
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" -s main \
|| ynh_setup_source --dest_dir="$install_dir" -s main_attic
_ynh_setup_source_with_fallback
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"