Moved changing to WORKING_DIRECTORY here

This commit is contained in:
Gerhard Hoffmann 2023-05-24 17:29:15 +02:00
parent 847c58afc8
commit 8f50f62a52

View File

@ -25,6 +25,7 @@ if [ -z $IFS ]; then
fi
MAINTENANCE="NO"
WORKING_DIRECTORY=${PWD}
# parse commandline parameters
while test $# -gt 0; do
@ -67,16 +68,23 @@ while test $# -gt 0; do
shift
done
if cd "$WORKING_DIRECTORY"; then
source ./update_psa_impl
source ./update_psa_impl
if read_config
then
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
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
@ -99,9 +107,6 @@ if cd "$WORKING_DIRECTORY"; then
# updates available
update_psa
fi
fi
exit 0
fi
exit -1
exit 0
###############################################################################