diff --git a/update_psa_helpers b/update_psa_helpers index 86e75df..d9a799d 100755 --- a/update_psa_helpers +++ b/update_psa_helpers @@ -45,6 +45,8 @@ copy () { # macht fuer dc keinen sinn # local sysdir=$(echo $f | # sed -E -e s'=(.*szeged/[0-9]/[0-9])(.*)(/.*)=\2=g') + + # TODO: kuerzen copy_necessary=1 @@ -167,89 +169,22 @@ check_md5_for_changed_json_and_ini_files () { # .../szeged/1/1... log_debug "$func:${LINENO} checking file=${file}..." local __fs=${file##*.} - # local __bn=$(basename $file .$__fsuffix) - # local __key_suffix=$(echo $file | - # sed -E -e 's=(.*[0-9]/[0-9])([^.]+)(.*)=\2=g' -e 's=/=.=g') + js_key="" case $file in *.ini | *.json | *.hex) - - set -x local __key_suffix=$(echo $file | sed -E -e 's=(.*[0-9]/[0-9])([^.]+)(.*)=\2=g' -e 's=/=.=g') js_key=".$__fs.$__cl.zg[$ZONE_GROUP].z[$ZONE]$__key_suffix" md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key) md5sum_repository="$(md5_of $CUSTOMER_ID_BASE_DIR/$file)" - set +x - - ;; - # *.hex) - # js_key=$(echo $file | - # sed -E -e 's=(.*szeged)([^.]+)(.*)=\2=g' -e 's=/=.=g') - # md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key) - # md5sum_repository="$(md5_of $CUSTOMER_ID_BASE_DIR/$file)" - # ;; *) log_crit "$func:${LINENO} unknown file=${file}" ;; esac - #if [[ "$file" =~ .*dc2c.hex.* ]]; then - # js_key=$(echo $file | - # sed -E -e 's=(.*$CUSTOMER_LOCATION)([^.]+)(.*)=\2=g' - # -e 's=/=.=g') - # md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key) - # md5sum_repository="$(md5_of $CUSTOMER_ID_BASE_DIR/$file)" - #else - # if [[ "$file" =~ .*cash[.]json.* ]]; then - # js_key=".ini.$__cl.zg[$ZONE_GROUP].z[$ZONE]$__key_suffix" - # md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key) - # md5sum_repository="$(md5_of $CUSTOMER_ID_BASE_DIR/$file)" - # elif [[ "$file" =~ .*print[0-9][0-9][.]json.* ]]; then - # js_key=".ini.$__cl.zg[$ZONE_GROUP].z[$ZONE]$__key_suffix" - # md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key) - # md5sum_repository="$(md5_of $CUSTOMER_ID_BASE_DIR/$file)" - # elif [[ "$file" =~ .*conf[.]json.* ]]; then - # js_key=".ini.$__cl.zg[$ZONE_GROUP].z[$ZONE]$__key_suffix" - # md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key) - # md5sum_repository="$(md5_of $CUSTOMER_ID_BASE_DIR/$file)" - # elif [[ "$file" =~ .*serial[.]json.* ]]; then - # js_key=".ini.$__cl.zg[$ZONE_GROUP].z[$ZONE]$__key_suffix" - # md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key) - # md5sum_repository="$(md5_of $CUSTOMER_ID_BASE_DIR/$file)" - #################################################################### - ## ATBQT.ini - #################################################################### - # elif [[ "$file" =~ .*/$ATBQT_INI.* ]]; then - # js_key=".ini.$__cl.zg[$ZONE_GROUP].z[$ZONE]$__key_suffix" - # md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key) - # md5sum_repository=$(md5_of $CUSTOMER_ID_BASE_DIR/$file) - #################################################################### - ## sysconfig.ini - #################################################################### - # elif [[ "$file" =~ .*/$SYSCONF_INI.* ]]; then - # js_key=".ini.$__cl.zg[$ZONE_GROUP].z[$ZONE]$__key_suffix" - # md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key) - # md5sum_repository=$(md5_of $CUSTOMER_ID_BASE_DIR/$file) - #################################################################### - ## SystemControl.ini - #################################################################### - # elif [[ "$file" =~ .*/$SYSCTRL_INI.* ]]; then - # js_key=".ini.$__cl.zg[$ZONE_GROUP].z[$ZONE]$__key_suffix" - # md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key) - # md5sum_repository=$(md5_of $CUSTOMER_ID_BASE_DIR/$file) - #################################################################### - ## ISMASMgr.ini - #################################################################### - # elif [[ "$file" =~ .*/$ISMASMMGR_INI.* ]]; then - # js_key=".ini.$__cl.zg[$ZONE_GROUP].z[$ZONE]$__key_suffix" - # md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key) - # md5sum_repository=$(md5_of $CUSTOMER_ID_BASE_DIR/$file) - # fi - #fi - test -z $js_key && continue PERCENT=$((PERCENT+1))