From ee2b79ac13eb0b77e50262c3f5f617567ec1757e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 12:28:12 +0200 Subject: [PATCH] Move exec_occ to common.sh --- scripts/_common.sh | 12 +++++++++--- scripts/install | 6 ------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index eb8de61..6366b74 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,11 +1,15 @@ #!/bin/bash #================================================= -# COMMON VARIABLES +# COMMON FUCTIONS #================================================= -#================================================= -# EXPERIMENTAL HELPERS +# Define a function to execute commands with `occ` +exec_occ() { + (cd "$install_dir" && ynh_exec_as "$app" \ + php${phpversion} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") +} + #================================================= # Define a function to add an external storage @@ -20,6 +24,8 @@ local mount_id=$(exec_occ files_external:create --output=json \ || exec_occ files_external:option "$mount_id" enable_sharing true } +#================================================= +# EXPERIMENTAL HELPERS #================================================= # Check if an URL is already handled diff --git a/scripts/install b/scripts/install index f0673b1..82d8345 100755 --- a/scripts/install +++ b/scripts/install @@ -79,12 +79,6 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Installing $app..." --weight=30 -# Define a function to execute commands with `occ` -exec_occ() { - (cd "$install_dir" && ynh_exec_as "$app" \ - php${phpversion} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") -} - # Set write access for the following commands chown -R $app: "$install_dir" "$data_dir"