From 743b445b06b0a5ea6d6d8fb6a03a7ecce47cf99a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gilles=20Qu=C3=A9not?= Date: Fri, 15 Nov 2024 08:09:29 +0700 Subject: [PATCH] Version detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the previous command, the `|&` was not a typo but intentional. Was removed outside of github AFAIK. The output of `php occ version` is on `STDERR`. Anyway, now this is a POSIX way to detect version. Signed-off-by: Gilles Quénot --- developer_manual/digging_deeper/profiler.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/developer_manual/digging_deeper/profiler.rst b/developer_manual/digging_deeper/profiler.rst index ed4ac591c..21822c960 100644 --- a/developer_manual/digging_deeper/profiler.rst +++ b/developer_manual/digging_deeper/profiler.rst @@ -13,9 +13,9 @@ using the latest development version of Nextcloud. .. code-block:: bash + major_version=$(php occ version 2>&1 | awk -F'[. ]' '{print $2;exit}') cd apps/ - git clone --branch stableX https://github.com/nextcloud/profiler.git - # adapt X to your Nextcloud version: sudo -E -u www-data php occ version | grep -oP 'Nextcloud \K\d+' + git clone --branch stable$major_version https://github.com/nextcloud/profiler.git cd profiler cd ../..