From a289ac4425aec1b55c0247c24623a6fd7fa5542d Mon Sep 17 00:00:00 2001 From: ipa-nhg Date: Wed, 15 Jan 2020 14:11:45 +0100 Subject: [PATCH 1/4] add travis test configuration --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2340525 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: bash + +before_install: + - sudo apt-get -y install zenity +script: + - bash SeRoNet-Infrastructure-Installer-v1.0.sh From c746ade6a662709230f9bf282c70f490e2cc62cb Mon Sep 17 00:00:00 2001 From: ipa-nhg Date: Wed, 15 Jan 2020 15:11:57 +0100 Subject: [PATCH 2/4] add non-visual installation action --- .travis.yml | 2 +- SeRoNet-Infrastructure-Installer-v1.0.sh | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) mode change 100644 => 100755 SeRoNet-Infrastructure-Installer-v1.0.sh diff --git a/.travis.yml b/.travis.yml index 2340525..2160f8b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,4 +3,4 @@ language: bash before_install: - sudo apt-get -y install zenity script: - - bash SeRoNet-Infrastructure-Installer-v1.0.sh + - bash SeRoNet-Infrastructure-Installer-v1.0.sh non-visual-installation diff --git a/SeRoNet-Infrastructure-Installer-v1.0.sh b/SeRoNet-Infrastructure-Installer-v1.0.sh old mode 100644 new mode 100755 index 270d184..851c1c1 --- a/SeRoNet-Infrastructure-Installer-v1.0.sh +++ b/SeRoNet-Infrastructure-Installer-v1.0.sh @@ -525,4 +525,24 @@ ros) fi ;; +############################################################################### +non-visual-installation) + + CURRENT_ACTION_NUMBER=$((0)) + ACTIONS="ace-smartsoft opcua-backend opcua-devices ros" + SELECTED_ACTIONS_COUNTER=4 + for CURR_ACTION in $ACTIONS; do + # execute the next action + echo "#### Execute installation step $CURR_ACTION ####" + bash $SCRIPT_NAME $CURR_ACTION $INSTALLATION_DIR $LOGFILE $CURRENT_ACTION_NUMBER $SELECTED_ACTIONS_COUNTER + # abort executing further commands if the previos command returned with != 0 + if [ $? -ne 0 ]; then + exit $? + fi + # calculate the progress percentage number and print it to the /tmp/install-msg.log + CURRENT_ACTION_NUMBER=$(($CURRENT_ACTION_NUMBER + 1)) + awk "BEGIN { print $CURRENT_ACTION_NUMBER/$SELECTED_ACTIONS_COUNTER*100 }" >> /tmp/install-msg.log + done +;; + esac From ba593343e09ff19040dd01fc623bccf6f1f841fe Mon Sep 17 00:00:00 2001 From: ipa-nhg Date: Wed, 15 Jan 2020 15:41:08 +0100 Subject: [PATCH 3/4] add 18.04 test for travis --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2160f8b..8f7d9ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,13 @@ language: bash +matrix: + include: + - os: linux + dist: xenial + sudo: required + - os: linux + dist: bionic + sudo: required before_install: - sudo apt-get -y install zenity script: From 60cdff00fc5d1df7b4a2fcb1285e62ef562f86d8 Mon Sep 17 00:00:00 2001 From: ipa-nhg Date: Wed, 15 Jan 2020 16:07:59 +0100 Subject: [PATCH 4/4] rename script --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8f7d9ab..dd5acfe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,4 @@ matrix: before_install: - sudo apt-get -y install zenity script: - - bash SeRoNet-Infrastructure-Installer-v1.0.sh non-visual-installation + - bash SeRoNet-Infrastructure-Installer-latest.sh non-visual-installation