From 8bee85518de978e41cec1456dbeb8ac0978708df Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Thu, 28 Feb 2019 18:05:10 +0100 Subject: [PATCH] [enh] Remove sudo and double brackets --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2d54c82..e83811c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -205,8 +205,8 @@ do # Backup 3rd party applications from the current nextcloud # But do not overwrite if there is any upgrade # (apps directory already exists in Nextcloud archive) - for nc_app_dir in $(sudo ls "${final_path}/apps"); do - [[ ! -d "${tmpdir}/apps/${nc_app_dir}" ]] \ + for nc_app_dir in $(ls "${final_path}/apps"); do + [ ! -d "${tmpdir}/apps/${nc_app_dir}" ] \ && cp -a "${final_path}/apps/${nc_app_dir}" "${tmpdir}/apps/${nc_app_dir}" done