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

@@ -10,7 +10,7 @@ CONFIG=0
CONFIG_FILE_NAME="${toolName}.cfg"
CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example"
step_config() {
seq_config() {
initSeqConfig "$CONFIG_FILE_NAME" "$CONFIG_FILE_TEMPLATE"
if [ $? -eq 0 ] ; then
echo " ${toolName} path: ${ELEMENT_WEB_LOC}"
@@ -20,7 +20,7 @@ step_config() {
}
step_18_info() { echo "Check for updates"; }
step_18_alias() { ALIAS="updatecheck"; }
step_18_alias() { echo "updatecheck"; }
step_18() {
shift
local latestVersion=
@@ -49,12 +49,12 @@ step_20_info() {
echo
fi
}
step_20_alias() { ALIAS="backup"; }
step_20_alias() { echo "backup"; }
step_20() {
shift
local tempRoot=
if [ $CONFIG -eq 0 ] ; then
echoerr " [E] No configuration file found"
error -e "No configuration file found"
return 1
fi
if [ ! -z $ELEMENT_WEB_BACKUP ] ; then
@@ -76,7 +76,7 @@ step_22_info() {
shift
if [ -z $1 ] ; then
echo -n "Get latest version from github"
if [ $CONTEXT_HELP -eq 0 ] ; then
if ! contextHelp ; then
echo ": $(curl --silent "$latestUrl" | grep -Po '"tag_name": "\K.*?(?=")')"
else
echo " [CUSTOM VERSION]"
@@ -85,7 +85,7 @@ step_22_info() {
echo "Get version $1 from github"
fi
}
step_22_alias() { ALIAS="upgrade"; }
step_22_alias() { echo "upgrade"; }
step_22() {
shift # don't need step number
local latestVersion=
@@ -96,16 +96,16 @@ 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
exe read -p "Install $latestVersion to $ELEMENT_WEB_LOC [n]o/(y)es? " answer
case $answer in
[yY])
;;
*)
echoerr " [I] Upgrade aborted"
info -e "Upgrade aborted"
return 1
;;
esac
@@ -155,10 +155,10 @@ tempDown="/tmp/${toolName}"
tempLoc="$tempDown/${toolName}.tar.gz"
step_24_info() { echo "Clean temporary files: $tempDown"; }
step_24_alias() { ALIAS="clean"; }
step_24_alias() { echo "clean"; }
step_24() {
exe rm -rf "$tempDown"
}
VERSION_SEQREV=11
readonly sqr_minVersion=16
. /usr/local/bin/sequencer.sh