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

@@ -11,17 +11,17 @@ CONFIG=0
CONFIG_FILE_NAME="${toolName}.cfg"
CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example"
step_config() {
seq_config() {
initSeqConfig -t "$CONFIG_FILE_NAME" "$CONFIG_FILE_TEMPLATE"
if [ $? -eq 0 ] ; then
CONFIG=1
else
echoerr " [E] Check output for errors"
error -e "Check output for errors"
# End if no configuration file exists
[ $DRY -eq 0 ] && return -1
dry || return -1
fi
[ $QUIET -ne 0 ] && APTOPT="-y"
quiet && APTOPT="-y"
return 0
}
@@ -31,12 +31,12 @@ step_1_info() {
echoinfo "Essential excludes are provided in the configuration template."
echoinfo "($CONFIG_FILE_TEMPLATE)"
}
step_1_alias() { ALIAS="buroot"; }
step_1_alias() { echo "buroot"; }
step_1() {
local buTarget="/backup"
if [ $CONFIG -eq 0 ] ; then
echoerr " [E] Cannot backup root without properly configured excludes"
echoerr " (expected config: $SEQ_CONFIG_HOME/$CONFIG_FILE_NAME)"
error -e "Cannot backup root without properly configured excludes"
error -e " (expected config: $SEQ_CONFIG_HOME/$CONFIG_FILE_NAME)"
else
buTarget="$BACKUP_TARGET"
fi
@@ -81,7 +81,7 @@ step_3_info() {
echoinfo "e.g. to exclude $dir/a:"
echoinfo " $0 budir $dir $tar /a"
}
step_3_alias() { ALIAS="budir"; }
step_3_alias() { echo "budir"; }
step_3() {
local arg
local configTarget=0
@@ -105,7 +105,7 @@ step_3() {
done
if [ -z "$1" ] ; then
echoerr " [E] Nothing found to backup $1"
error -e "Nothing found to backup $1"
exit 1
fi
@@ -125,7 +125,7 @@ step_3() {
buTarget=$(echo "$BACKUP_TARGET" | sed 's:/*$::')
else
if [ -z "$1" ] ; then
echoerr " [E] No valid target found"
error -e "No valid target found"
exit 1
fi
buTarget=$(echo "$1" | sed 's:/*$::')
@@ -133,7 +133,7 @@ step_3() {
fi
if [ ! -d "${buTarget}" ] && [ ! -L "${buTarget}" ]
then
echoerr " [E] Backup target (${buTarget}) doesn't exist"
error -e "Backup target (${buTarget}) doesn't exist"
exit 1
fi
@@ -141,9 +141,9 @@ step_3() {
buExcludes+=("--exclude='$exclu'")
done
echoseq " [I] Source : $buSource"
echoseq " [I] Target : $buTarget"
echoseq " [I] Excludes: $@"
info "Source : $buSource"
info "Target : $buTarget"
info "Excludes: $@"
#fix doubling trailing slash on verbose output when backing up root
local tmpSource="$buSource/"
@@ -160,7 +160,7 @@ step_3() {
fi
if [ ! -w "${buTarget}" ] ; then
echoerr " [E] Backup target (${buTarget}) is not writable"
error -e "Backup target (${buTarget}) is not writable"
exit 1
fi
@@ -174,7 +174,7 @@ step_3() {
}
step_100_info() { echo "Install $toolBin"; }
step_100_alias() { ALIAS="install"; }
step_100_alias() { echo "install"; }
step_100() {
exe apt update
exe apt install $toolBin $APTOPT
@@ -188,6 +188,6 @@ checkInstalled() {
toolBin="$(command -v $toolBin)"
}
VERSION_SEQREV=14
readonly sqr_minVersion=16
. /usr/local/bin/sequencer.sh