Compare commits

..

No commits in common. "8f50f62a527de0f976e9ea71c69515b7232f39c1" and "96d76b856a739bc69a0bf90a9264981ac0baa482" have entirely different histories.

3 changed files with 41 additions and 38 deletions

View File

@ -39,6 +39,7 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
read_config() { read_config() {
local func="${FUNCNAME[0]}" local func="${FUNCNAME[0]}"
WORKING_DIRECTORY=${PWD}
CONFIGFILENAME=${CONFIGFILENAME:-'update_psa.conf'} CONFIGFILENAME=${CONFIGFILENAME:-'update_psa.conf'}
if ! [ -f "$CONFIGFILENAME" ]; then if ! [ -f "$CONFIGFILENAME" ]; then
@ -50,6 +51,13 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
local readonly cf="$CONFIGFILENAME" local readonly cf="$CONFIGFILENAME"
### TODO: wieso wird hier in das verzeichnis gewechselt
if cd $WORKING_DIRECTORY ; then
log_debug "$func:${LINENO}: cd to $WORKING_DIRECTORY"
else
log_fatal "$func:${LINENO}: cannot cd to $WORKING_DIRECTORY"
fi
readonly GIT_SSL_NO_VERIFY="$(cat "$cf" | jq -r .GIT_SSL_NO_VERIFY)" readonly GIT_SSL_NO_VERIFY="$(cat "$cf" | jq -r .GIT_SSL_NO_VERIFY)"
assert_s GIT_SSL_NO_VERIFY assert_s GIT_SSL_NO_VERIFY

View File

@ -25,7 +25,6 @@ if [ -z $IFS ]; then
fi fi
MAINTENANCE="NO" MAINTENANCE="NO"
WORKING_DIRECTORY=${PWD}
# parse commandline parameters # parse commandline parameters
while test $# -gt 0; do while test $# -gt 0; do
@ -68,23 +67,16 @@ while test $# -gt 0; do
shift shift
done done
if cd "$WORKING_DIRECTORY"; then
source ./update_psa_impl source ./update_psa_impl
if [ -z "$WORKING_DIRECTORY" ]; then if read_config
log_fatal "update_psa:${LINENO}: empty WORKING_DIRECTORY" then
fi
if ! cd "$WORKING_DIRECTORY"; then
log_fatal "update_psa:${LINENO}: cannot cd to $WORKING_DIRECTORY"
fi
log_info "update_psa:${LINENO}: cd to $WORKING_DIRECTORY"
if read_config; then
check_default_route check_default_route
check_route_to_repository "185.191.219.134" # git.mimbach.de check_route_to_repository "185.191.219.134" # git.mimbach.de
check_for_running_apism check_for_running_apism
if clone_customer_repository ${CUSTOMER_REPOSITORY_PATH}; then if clone_customer_repository ${CUSTOMER_REPOSITORY_PATH}
then
check_sanity_of_repository check_sanity_of_repository
if [ "$MAINTENANCE" = "NO" ]; then if [ "$MAINTENANCE" = "NO" ]; then
@ -109,4 +101,7 @@ if read_config; then
fi fi
fi fi
exit 0 exit 0
fi
exit -1
############################################################################### ###############################################################################

View File

@ -13,7 +13,7 @@
"" : "local branches", "" : "local branches",
"local_branches" : ["master", "local_branches" : ["master",
"zg1/zone1", "zg1/zone2", "zg1/zone3", "zg1/zone4"], "zg1/zone1", "zg1/zone2", "zg1/zone3"],
"" : "customer number of PSA", "" : "customer number of PSA",
"customer_id_" : "/etc/cust_nr", "customer_id_" : "/etc/cust_nr",
@ -26,7 +26,7 @@
"" : "0-index used as size of following array", "" : "0-index used as size of following array",
"" : ".zg[0]: #n of zones_groups", "" : ".zg[0]: #n of zones_groups",
"" : ".zg[1].z[0]: #n of zones in zg[1]", "" : ".zg[1].z[0]: #n of zones in zg[1]",
"zg" : [ 1, { "z" : [ 4, 1, 2, 4] } ], "zg" : [ 1, { "z" : [ 3, 1, 2, 3] } ],
"" : "url of customer repository", "" : "url of customer repository",
"cust_repository_path" : "https://git.mimbach49.de/GerhardHoffmann/customer_281.git" "cust_repository_path" : "https://git.mimbach49.de/GerhardHoffmann/customer_281.git"