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

30 lines
1 KiB
Bash
Raw Permalink Normal View History

2020-04-17 14:38:01 +02:00
#!/bin/bash
2019-02-09 23:46:07 +01:00
2020-04-17 14:38:01 +02:00
#=================================================
# COMMON VARIABLES
#=================================================
2019-02-09 23:46:07 +01:00
2020-04-17 14:38:01 +02:00
#=================================================
# PERSONAL HELPERS
#=================================================
2019-02-09 23:46:07 +01:00
_dotclear2_setup_source() {
# 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=$(cat $YNH_APP_BASEDIR/manifest.toml | toml_to_json | jq '.resources.sources.latest.url' -r)
if curl --output /dev/null --silent --head --fail "$src_url"; then
ynh_setup_source --dest_dir="$install_dir" --source_id="latest"
else
ynh_setup_source --dest_dir="$install_dir" --source_id="attic"
fi
}
2020-04-17 14:38:01 +02:00
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
2019-02-09 23:46:07 +01:00
2020-04-17 14:38:01 +02:00
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================