diff --git a/scripts/upgrade b/scripts/upgrade index f20db53..9d4d8b0 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -32,6 +32,14 @@ fi # VERSION TO THE NEXT ONE #================================================= +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` exec_occ() { # Backward compatibility to upgrade from older versions @@ -58,7 +66,7 @@ exec_occ() { ynh_install_app_dependencies "$pkg_dependencies" fi (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