From fa41ed36ab2dfaac439256267c04af703c513b6b Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Thu, 2 Jun 2022 17:22:27 +0200 Subject: [PATCH] add another helper bash file --- update_psa_helpers | 70 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 update_psa_helpers diff --git a/update_psa_helpers b/update_psa_helpers new file mode 100644 index 0000000..ca05f8c --- /dev/null +++ b/update_psa_helpers @@ -0,0 +1,70 @@ +#!/bin/bash + +# if [ ${git_helpers_sourced:-1} = "1" ]; then +# readonly git_helpers_sourced=${BASH_SOURCE[0]} +#else +# return 0 +#fi + +# Fetch/merge updates from predefined repository using git. +# +fetch_customer_updates() { + local func="${FUNCNAME[0]}" + if ! pull_customer_repository customer_281; then + return 1 + fi + return 0 +} + +# Check if the fetched/merged files have the correct md5 and are +# valid for the PSA. +# +check_new_customer_files() { + local func="${FUNCNAME[0]}" + return 0 +} + +# In case the new checked-out files are not correct, revert the git +# repository to its previous state. +# +revert_customer_repository() { + local func="${FUNCNAME[0]}" + return 0 +} + +# Backup before the update-process. +# +backup_previous_version() { + local func="${FUNCNAME[0]}" + return 0 +} + +# Try to install new opkg-packages (in case the are some +# in the new git-checkout). +# +do_update_dry_run() { + local func="${FUNCNAME[0]}" + return 0 +} + +# Install the new packages using opkg. +# +do_update() { + local func="${FUNCNAME[0]}" + return 0 +} + +# In case there was some error, re-install the previous package(s) +# and use the backup to restore any conf/ini-files. +# +fallback_to_previous_version() { + local func="${FUNCNAME[0]}" + return 0; +} + +# If all went well, then execute all necessary cleanup steps. +# +cleanup_previous_version() { + local func="${FUNCNAME[0]}" + return 0 +}