6 Commits

5 changed files with 15 additions and 13 deletions

View File

@@ -90,7 +90,7 @@ clone_customer_repository () {
# check if the directory is empty. If so, clone the # check if the directory is empty. If so, clone the
# customer repository # customer repository
if ! find ./$WORKSPACE_DIR -mindepth 1 -maxdepth 1 | read; then if ! find ./$WORKSPACE_DIR -mindepth 1 -maxdepth 1 | read; then
log_info "$func:${LINENO} cloning ${1} ..." log_info "$func:${LINENO} cloning ${1} into ${PWD}/${WORKSPACE_DIR}..."
if ! cd "./$WORKSPACE_DIR"; then if ! cd "./$WORKSPACE_DIR"; then
update_psa_clone_error # message to ISMAS update_psa_clone_error # message to ISMAS
log_fatal "$func:${LINENO} can not change to $WORKSPACE_DIR" log_fatal "$func:${LINENO} can not change to $WORKSPACE_DIR"

View File

@@ -2,7 +2,8 @@
source ./log_helpers source ./log_helpers
if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once if [ "${news_from_ismas_sourced:-1}" = "1" ]; then # include only once
readonly news_from_ismas_sourced=${BASH_SOURCE[0]}
readonly APISM_DIRECT_PORT=7778 readonly APISM_DIRECT_PORT=7778
updates_available () { updates_available () {

View File

@@ -203,7 +203,7 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
readonly SYSCONF_INI="sysconfig.ini" readonly SYSCONF_INI="sysconfig.ini"
readonly SYSCTRL_INI="SystemControl.ini" readonly SYSCTRL_INI="SystemControl.ini"
readonly TARIFF_CURRENT="tariff.current" readonly TARIFF_CURRENT="tariff.current"
readonly DC="dc2c.hex" readonly DC="dc2c.bin"
readonly TARIFF_SUMMER="summer_tariff.json" readonly TARIFF_SUMMER="summer_tariff.json"
readonly TARIFF_WINTER="winter_tariff.json" readonly TARIFF_WINTER="winter_tariff.json"

View File

@@ -31,7 +31,6 @@ WORKING_DIRECTORY=${PWD}
while test $# -gt 0; do while test $# -gt 0; do
case $1 in case $1 in
--maintenance | -m ) --maintenance | -m )
shift
MAINTENANCE="YES" MAINTENANCE="YES"
;; ;;
--file | --fil | --fi | --f | -file | -fil | -fi | -f ) --file | --fil | --fi | --f | -file | -fil | -fi | -f )
@@ -44,7 +43,11 @@ while test $# -gt 0; do
;; ;;
--wdir | --wdi | --wd | --w | -wdir | -wdi | -wd | -w ) --wdir | --wdi | --wd | --w | -wdir | -wdi | -wd | -w )
shift shift
if [ "$1" = "." ]; then
WORKING_DIRECTORY="$PWD"
else
WORKING_DIRECTORY="$1" WORKING_DIRECTORY="$1"
fi
;; ;;
--help | -hel | --he | --h | '--?' | -help | -hel | -he | -h | '-?' ) --help | -hel | --he | --h | '--?' | -help | -hel | -he | -h | '-?' )
usage_and_exit 0 usage_and_exit 0

View File

@@ -67,7 +67,6 @@ update_psa() {
# Fetch new updates (using git). but only when repository has already been # Fetch new updates (using git). but only when repository has already been
# cloned. # cloned.
if [ $GIT_CLONE_EXECUTED -eq 0 ]; then
if ! fetch_customer_updates; then if ! fetch_customer_updates; then
log_error "$func:${LINENO}: fetch no data for $customer_id"\ log_error "$func:${LINENO}: fetch no data for $customer_id"\
"-> no files to update -> no psa update" "-> no files to update -> no psa update"
@@ -75,7 +74,6 @@ update_psa() {
"update request, but no change in $CUSTOMER_REPOSITORY_PATH" "update request, but no change in $CUSTOMER_REPOSITORY_PATH"
# TODO # TODO
fi fi
fi
update_psa_pull_customer_repository # message to ISMAS update_psa_pull_customer_repository # message to ISMAS
} }