From 286d199272e85feaa7410f1fd0c6e004eb80fede Mon Sep 17 00:00:00 2001 From: Jeremy Fleischman Date: Sun, 15 Dec 2024 22:18:42 -0800 Subject: [PATCH] Add `--check`, `--rdfind`, `--no-rdfind` options to `install-onlyoffice.sh` `--check` is useful for anyone who wants to check if their OnlyOffice installation is up to date without actually installing it. The `--rdfind/--no-rdfind` commands serve a few purposes: 1. It makes it clear that `rdfind` can still run even if you specify `--check`. 2. People can ensure that `rdfind` runs by specifying `--rdfind`, which helps if they accidentally uninstall `rdfind`. 3. People can now skip running `rdfind` even if they have `rdfind` installed. --- install-onlyoffice.sh | 68 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 59 insertions(+), 9 deletions(-) diff --git a/install-onlyoffice.sh b/install-onlyoffice.sh index 6f9981c34..da42811af 100755 --- a/install-onlyoffice.sh +++ b/install-onlyoffice.sh @@ -37,7 +37,17 @@ main() { install_x2t v7.3+1 ab0c05b0e4c81071acea83f0c6a8e75f5870c360ec4abc4af09105dd9b52264af9711ec0b7020e87095193ac9b6e20305e446f2321a541f743626a598e5318c1 rm -rf "$BUILDS_DIR" - if command -v rdfind &>/dev/null; then + + if [ "${RDFIND+x}" != "x" ]; then + if command -v rdfind &>/dev/null; then + RDFIND="1" + else + RDFIND="0" + fi + fi + + if [ "$RDFIND" = "1" ]; then + ensure_command_available rdfind rdfind -makehardlinks true -makeresultsfile false $OO_DIR/v* fi } @@ -73,6 +83,18 @@ parse_arguments() { TRUST_REPOSITORY="1" shift ;; + --check) + CHECK="1" + shift + ;; + --rdfind) + RDFIND="1" + shift + ;; + --no-rdfind) + RDFIND="0" + shift + ;; *) show_help shift @@ -103,9 +125,6 @@ show_help() { cat <x2t.zip.sha512