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:
parent
1052f09f19
commit
e4c3befb53
3 changed files with 14 additions and 3 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue