mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Filter boring occ warnings during upgrade
This commit is contained in:
parent
64a5081946
commit
94232f066d
1 changed files with 9 additions and 1 deletions
|
@ -34,6 +34,14 @@ fi
|
||||||
current_version=$(grep OC_VersionString "$install_dir/version.php" | cut -d\' -f2)
|
current_version=$(grep OC_VersionString "$install_dir/version.php" | cut -d\' -f2)
|
||||||
current_major_version=${current_version%%.*}
|
current_major_version=${current_version%%.*}
|
||||||
|
|
||||||
|
filter_boring_occ_warnings() {
|
||||||
|
# Filter stupid and boring messages such as the progress bar looking like:
|
||||||
|
# 3/3 [============================] 100% Starting ...
|
||||||
|
# and being pretty much useless, as well as the annoying warning about "only a limited number of commands" etc...
|
||||||
|
|
||||||
|
sed -E 's@\s*([0-9]+\/[0-9]+\s+\[(-|>|=)+\]\s+[0-9]+%|\s*Starting ...|Nextcloud or one of the apps require upgrade - only a limited number of commands are available|You may use your browser or the occ upgrade command to do the upgrade)@@g'
|
||||||
|
}
|
||||||
|
|
||||||
# Define a function to execute commands with `occ`
|
# Define a function to execute commands with `occ`
|
||||||
exec_occ() {
|
exec_occ() {
|
||||||
# Backward compatibility to upgrade from older versions
|
# Backward compatibility to upgrade from older versions
|
||||||
|
@ -59,7 +67,7 @@ exec_occ() {
|
||||||
ynh_install_app_dependencies "$pkg_dependencies"
|
ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
fi
|
fi
|
||||||
(cd "$install_dir" && ynh_exec_as "$app" \
|
(cd "$install_dir" && ynh_exec_as "$app" \
|
||||||
php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@")
|
php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") 2> >(filter_boring_occ_warnings >&2)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Define a function to add an external storage
|
# Define a function to add an external storage
|
||||||
|
|
Loading…
Add table
Reference in a new issue