mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
commit
4ef4af935d
8 changed files with 8 additions and 47 deletions
|
@ -29,7 +29,7 @@ In addition to Nextcloud core features, the following are made available with th
|
|||
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal
|
||||
|
||||
|
||||
**Shipped version:** 28.0.3~ynh2
|
||||
**Shipped version:** 28.0.4~ynh1
|
||||
|
||||
**Demo:** <https://demo.nextcloud.com/>
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suiv
|
|||
* Utilise l'adresse `/.well-known` pour la synchronisation CalDAV et CardDAV du domaine si aucun autre service ne l'utilise déjà - par exemple, Baïkal
|
||||
|
||||
|
||||
**Version incluse :** 28.0.3~ynh2
|
||||
**Version incluse :** 28.0.4~ynh1
|
||||
|
||||
**Démo :** <https://demo.nextcloud.com/>
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ In addition to Nextcloud core features, the following are made available with th
|
|||
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal
|
||||
|
||||
|
||||
**Versión proporcionada:** 28.0.3~ynh2
|
||||
**Versión proporcionada:** 28.0.4~ynh1
|
||||
|
||||
**Demo:** <https://demo.nextcloud.com/>
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ In addition to Nextcloud core features, the following are made available with th
|
|||
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal
|
||||
|
||||
|
||||
**Versione pubblicata:** 28.0.3~ynh2
|
||||
**Versione pubblicata:** 28.0.4~ynh1
|
||||
|
||||
**Prova:** <https://demo.nextcloud.com/>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ name = "Nextcloud"
|
|||
description.en = "Online storage, file sharing platform and various other applications"
|
||||
description.fr = "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
|
||||
|
||||
version = "28.0.3~ynh2"
|
||||
version = "28.0.4~ynh1"
|
||||
|
||||
maintainers = ["kay0u"]
|
||||
|
||||
|
@ -59,8 +59,8 @@ ram.runtime = "512M"
|
|||
[resources.sources]
|
||||
|
||||
[resources.sources.main]
|
||||
url = 'https://download.nextcloud.com/server/releases/nextcloud-28.0.3.tar.bz2'
|
||||
sha256 = '9ed413c0de16f5b033ceeffcca99c0d61fc698dbeb8db851ac9adf9eef951906'
|
||||
url = 'https://download.nextcloud.com/server/releases/nextcloud-28.0.4.tar.bz2'
|
||||
sha256 = '9bfecee1e12fba48c49e9a71caa81c4ba10b2884787fab75d64ccfd122a13019'
|
||||
|
||||
[resources.sources.27]
|
||||
url = 'https://download.nextcloud.com/server/releases/nextcloud-27.0.0.tar.bz2'
|
||||
|
|
|
@ -40,45 +40,6 @@ is_url_handled() {
|
|||
fi
|
||||
}
|
||||
|
||||
#=================================================
|
||||
|
||||
# Check available space before creating a temp directory.
|
||||
#
|
||||
# usage: ynh_smart_mktemp --min_size="Min size"
|
||||
#
|
||||
# | arg: -s, --min_size= - Minimal size needed for the temporary directory, in Mb
|
||||
ynh_smart_mktemp () {
|
||||
# Declare an array to define the options of this helper.
|
||||
declare -Ar args_array=( [s]=min_size= )
|
||||
local min_size
|
||||
# Manage arguments with getopts
|
||||
ynh_handle_getopts_args "$@"
|
||||
|
||||
min_size="${min_size:-300}"
|
||||
# Transform the minimum size from megabytes to kilobytes
|
||||
min_size=$(( $min_size * 1024 ))
|
||||
|
||||
# Check if there's enough free space in a directory
|
||||
is_there_enough_space () {
|
||||
local free_space=$(df --output=avail "$1" | sed 1d)
|
||||
test $free_space -ge $min_size
|
||||
}
|
||||
|
||||
if is_there_enough_space /tmp; then
|
||||
local tmpdir=/tmp
|
||||
elif is_there_enough_space /var; then
|
||||
local tmpdir=/var
|
||||
elif is_there_enough_space /; then
|
||||
local tmpdir=/
|
||||
elif is_there_enough_space /home; then
|
||||
local tmpdir=/home
|
||||
else
|
||||
ynh_die "Insufficient free space to continue..."
|
||||
fi
|
||||
|
||||
echo "$(mktemp --directory --tmpdir="$tmpdir")"
|
||||
}
|
||||
|
||||
#=================================================
|
||||
# FUTURE OFFICIAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -164,7 +164,7 @@ then
|
|||
fi
|
||||
|
||||
# Create a temporary directory
|
||||
tmpdir="$(ynh_smart_mktemp min_size=300)"
|
||||
tmpdir="${install_dir}__tmp_upgrade"
|
||||
|
||||
ynh_setup_source --dest_dir="$tmpdir" --source_id="$source_id"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue