modernize multiple seqs and fix deprecated use of endCheckEmpty

This commit is contained in:
2022-12-12 16:42:25 +01:00
parent dbb8cac539
commit 7391de1ddd
18 changed files with 199 additions and 232 deletions

View File

@@ -3,20 +3,12 @@
# Dependency to other seqs
# - mysql.sh (soft; Missing informational output)
toolName="nextcloud"
readonly toolName="nextcloud"
localOcc=("echo" "occ not found!")
# Get script working directory
# (when called from a different directory)
sq_dir="$( cd "$( dirname -- "$(realpath "${BASH_SOURCE[0]}")")" >>/dev/null 2>&1 && pwd )"
sq_config=0
sq_configFileName="${toolName}.cfg"
sq_configFileTemplate="$sq_dir/${sq_configFileName}.example"
seq_config() {
## or to use sequencer api:
initSeqConfig "$sq_configFileName" "$sq_configFileTemplate"
if [ $? -eq 0 ] ; then
if initSeqConfig "${seq_configName:?}" "${seq_configTemplate:?}" ; then
sq_config=1
fi
localOcc=( sudo -u $sc_ncServerUser php "$(escpath "$sc_ncInstallDir/occ")" )
@@ -34,7 +26,7 @@ step_1() {
step_20_info() { echo "Upgrade $toolName on command line to latest version of selected release channel"; }
step_20_alias() { echo "upgrade"; }
step_20() {
if [ $sq_config -eq 0 ] ; then
if (( ! sq_config )) ; then
error -e "No configuration found to determine installation directory"
return 1
fi
@@ -64,9 +56,9 @@ step_102() {
if [ -z $1 ] ; then
error -e "No database provided"
if [ -f "${sq_dir}/mysql.sh" ] ; then
if [ -f "${seq_origin}/mysql.sh" ] ; then
echo " [I] Available mysql databases:"
"${sq_dir}/mysql.sh" -qq listdb
"${seq_origin}/mysql.sh" -qq listdb
fi
return 1
else
@@ -147,5 +139,7 @@ occ config:app:set preview jpeg_quality --value="60"
NOTES_END
}
# shellcheck disable=SC2034 # Appears unused
readonly sqr_minVersion=16
# shellcheck disable=SC1091 # Don't follow this source
. /usr/local/bin/sequencer.sh