Version detection

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 <gq@sputnick.fr>
This commit is contained in:
Gilles Quénot
2024-11-15 08:09:29 +07:00
committed by Simon L.
parent 3a4f59e43b
commit 743b445b06

View File

@@ -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 ../..