Used sequpgrade.sh to upgrade existing seqs

This commit is contained in:
2022-05-29 20:58:23 +02:00
parent 10ee4198f0
commit 6214493c18
57 changed files with 802 additions and 806 deletions

View File

@@ -16,7 +16,7 @@ CONFIG=0
CONFIG_FILE_NAME="${toolName}.cfg"
CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example"
step_config() {
seq_config() {
## use sequencer api:
initSeqConfig -t "$CONFIG_FILE_NAME" "$CONFIG_FILE_TEMPLATE"
if [ $CONFIG -eq 0 ] ; then
@@ -25,10 +25,10 @@ step_config() {
}
step_1_info() { echo "Install $toolName"; }
step_1_alias() { ALIAS="install"; }
step_1_alias() { echo "install"; }
step_1() {
local aptOpt=
if [ $QUIET -ne 0 ];then
if quiet;then
aptOpt="-y"
fi
@@ -53,7 +53,7 @@ step_2() {
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]
then
echoerr ' [E] Invalid installer checksum'
error -e ' [E] Invalid installer checksum'
exe rm composer-setup.php
return 1
fi
@@ -65,7 +65,7 @@ step_2() {
}
step_3_info() { echo "Configure $toolName"; }
step_3_alias() { ALIAS="config"; }
step_3_alias() { echo "config"; }
step_3() {
echo " [I] Recommended composer packages to be added to \"require\" section:"
echo ' "melanie2/mobile": "*",'
@@ -89,9 +89,9 @@ step_3() {
}
step_10_info() { echo "Configuration notes"; }
step_10_alias() { ALIAS="notes"; }
step_10_alias() { echo "notes"; }
step_10() {
outColor green
color green
cat <<NOTES_END
# smtp port if missing after installation
[$RC_LOC/config/config.inc.php]
@@ -126,9 +126,9 @@ NOTES_END
}
step_12_info() { echo "Troubleshooting"; }
step_12_alias() { ALIAS="trouble"; }
step_12_alias() { echo "trouble"; }
step_12() {
outColor green
color green
cat <<TROUBLE_END
# On composer update errors.
@@ -148,10 +148,10 @@ step_20_info() {
echo
fi
}
step_20_alias() { ALIAS="backup"; }
step_20_alias() { echo "backup"; }
step_20() {
if [ $CONFIG -eq 0 ] ; then
echoerr " [E] No configuration file found"
error -e "No configuration file found"
return 1
fi
if [ ! -z $RC_BACKUP ] ; then
@@ -168,7 +168,7 @@ step_22_info() {
echoinfoArgs "[CUSTOM VERSION]"
echo "Upgrade installation to \"latest\" from github if [CUSTOM_VERSION] is empty"
}
step_22_alias() { ALIAS="upgrade"; }
step_22_alias() { echo "upgrade"; }
step_22() {
shift # don't need step number
local currentVersion=
@@ -180,9 +180,9 @@ step_22() {
fi
if [ -z $latestVersion ] ; then
echoerr " [E] Cannot determine latest version from github repository"
error -e "Cannot determine latest version from github repository"
return 1
elif [ $QUIET -eq 0 ] ; then
elif interactive ; then
echo
currentVersion="$(grep -Po ' \| Version \K.*?(?= )' $RC_LOC/index.php)"
exe read -p "Install $latestVersion over $currentVersion to $RC_LOC [n]o/(y)es? " answer
@@ -190,7 +190,7 @@ step_22() {
[yY])
;;
*)
echoerr " [I] Upgrade aborted"
info -e "Upgrade aborted"
return 1
;;
esac
@@ -198,7 +198,7 @@ step_22() {
local isInstalled=$(grep -E "RELEASE $latestVersion" "${RC_LOC}/CHANGELOG" >>/dev/null && echo "1" || echo "0")
if [ $isInstalled -eq 1 ] ; then
echoerr " [E] Version $latestVersion is already installed"
error -e "Version $latestVersion is already installed"
return 2
fi
@@ -211,7 +211,7 @@ step_22() {
}
step_23_info() { echo "Post upgrade procedure"; }
step_23_alias() { ALIAS="postupgrade"; }
step_23_alias() { echo "postupgrade"; }
step_23() {
exe cd "$RC_LOC"
echo " [I] Starting post update procedure"
@@ -254,5 +254,5 @@ downloadLatest() {
tempDown="/tmp/roundcube"
tempLoc="$tempDown/rc.tar.gz"
VERSION_SEQREV=14
readonly sqr_minVersion=16
. /usr/local/bin/sequencer.sh