Compare commits
No commits in common. "8f50f62a527de0f976e9ea71c69515b7232f39c1" and "96d76b856a739bc69a0bf90a9264981ac0baa482" have entirely different histories.
8f50f62a52
...
96d76b856a
@ -39,6 +39,7 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||
read_config() {
|
||||
local func="${FUNCNAME[0]}"
|
||||
|
||||
WORKING_DIRECTORY=${PWD}
|
||||
CONFIGFILENAME=${CONFIGFILENAME:-'update_psa.conf'}
|
||||
|
||||
if ! [ -f "$CONFIGFILENAME" ]; then
|
||||
@ -50,6 +51,13 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||
|
||||
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)"
|
||||
assert_s GIT_SSL_NO_VERIFY
|
||||
|
||||
|
25
update_psa
25
update_psa
@ -25,7 +25,6 @@ if [ -z $IFS ]; then
|
||||
fi
|
||||
|
||||
MAINTENANCE="NO"
|
||||
WORKING_DIRECTORY=${PWD}
|
||||
|
||||
# parse commandline parameters
|
||||
while test $# -gt 0; do
|
||||
@ -68,23 +67,16 @@ while test $# -gt 0; do
|
||||
shift
|
||||
done
|
||||
|
||||
source ./update_psa_impl
|
||||
if cd "$WORKING_DIRECTORY"; then
|
||||
source ./update_psa_impl
|
||||
|
||||
if [ -z "$WORKING_DIRECTORY" ]; then
|
||||
log_fatal "update_psa:${LINENO}: empty WORKING_DIRECTORY"
|
||||
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
|
||||
if read_config
|
||||
then
|
||||
check_default_route
|
||||
check_route_to_repository "185.191.219.134" # git.mimbach.de
|
||||
check_for_running_apism
|
||||
if clone_customer_repository ${CUSTOMER_REPOSITORY_PATH}; then
|
||||
if clone_customer_repository ${CUSTOMER_REPOSITORY_PATH}
|
||||
then
|
||||
check_sanity_of_repository
|
||||
|
||||
if [ "$MAINTENANCE" = "NO" ]; then
|
||||
@ -107,6 +99,9 @@ if read_config; then
|
||||
# updates available
|
||||
update_psa
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
exit 0
|
||||
|
||||
exit -1
|
||||
###############################################################################
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
"" : "local branches",
|
||||
"local_branches" : ["master",
|
||||
"zg1/zone1", "zg1/zone2", "zg1/zone3", "zg1/zone4"],
|
||||
"zg1/zone1", "zg1/zone2", "zg1/zone3"],
|
||||
|
||||
"" : "customer number of PSA",
|
||||
"customer_id_" : "/etc/cust_nr",
|
||||
@ -26,7 +26,7 @@
|
||||
"" : "0-index used as size of following array",
|
||||
"" : ".zg[0]: #n of zones_groups",
|
||||
"" : ".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",
|
||||
"cust_repository_path" : "https://git.mimbach49.de/GerhardHoffmann/customer_281.git"
|
||||
|
Loading…
x
Reference in New Issue
Block a user