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

@@ -9,14 +9,14 @@ aHost=""
aPort="22"
step_1_info() { echo "Install $toolName"; }
step_1_alias() { ALIAS="install"; }
step_1_alias() { echo "install"; }
step_1() {
exe apt update
exe apt install ssh
}
step_3_info() { echo "Create $toolName authentication keys"; }
step_3_alias() { ALIAS="create"; }
step_3_alias() { echo "create"; }
step_3() {
exep "ssh-keygen -l -f $toolIdentity 2>>/dev/null"
if [ $? -eq 0 ]; then
@@ -32,7 +32,7 @@ step_5_info() {
echoinfo "[OPTIONS]"
echoinfo " -4 : Force Ipv4"
}
step_5_alias() { ALIAS="sendkey"; }
step_5_alias() { echo "sendkey"; }
step_5() {
shift
local arg
@@ -53,7 +53,7 @@ step_5() {
done
if [ -z "$1" ] || [ "$1" == "" ] ; then
echoerr " [E] Host not provided."
error -e "Host not provided."
return 1
else
sshHost="$1"
@@ -75,7 +75,7 @@ step_10_info() {
echo "Send command(ssh)/file(scp) list to remote(s)"
echoinfo "[USER:HOST] and [PORT] are overwritten by \"host\" command from <CMDLIST>"
}
step_10_alias() { ALIAS="sendlist"; }
step_10_alias() { echo "sendlist"; }
step_10() {
shift
aList=$1
@@ -115,11 +115,11 @@ parseList() {
if [ -z "$1" ] || [ ! -f "$1" ]; then
if [ -z "$1" ]; then
echoerr " [E] No Command list found"
error -e "No Command list found"
else
echoerr " [E] Command list not found: $1"
error -e "Command list not found: $1"
fi
if [ ! -z "$1" ] && [ $DRY == 0 ] && [ $QUIET == 0 ] ; then
if [ ! -z "$1" ] && dry || interactive ; then
read -p " Create template there y/[n]? " answer
case "$answer" in
y|Y)
@@ -132,7 +132,7 @@ parseList() {
return 1
fi
echoseq " [I] Parsing $(realpath $1) ..."
info "Parsing $(realpath $1) ..."
local line=1
# Working loop without ssh "stealing standard input" by
# https://unix.stackexchange.com/questions/24260/reading-lines-from-a-file-with-bash-for-vs-while
@@ -184,15 +184,15 @@ parseList() {
esac
getReturn
if [ $? -ne 0 ] ; then
echoerr -e " [E] $line:$errorMsg"
if [ $QUIET -eq 0 ] ; then
error -e -e " [E] $line:$errorMsg"
if interactive ; then
endReturn -f "Stop on first error"
fi
fi
((line++))
done 3<"$1"
echoseq " [I] Parsed $((--line)) lines"
info "Parsed $((--line)) lines"
}
listFileTemplate="# following files are send to host given on command line
@@ -210,5 +210,5 @@ f|/sourcedir/sourcefile|/destdir/destfile
f|/sourcedir/sourcefile|/destdir/destfile
c|/destdir2/update.sh"
VERSION_SEQREV=14
readonly sqr_minVersion=16
. sequencer.sh