shortened check_md5sum....()
This commit is contained in:
parent
e46f596270
commit
ba556f02bd
@ -46,6 +46,8 @@ copy () {
|
|||||||
# local sysdir=$(echo $f |
|
# local sysdir=$(echo $f |
|
||||||
# sed -E -e s'=(.*szeged/[0-9]/[0-9])(.*)(/.*)=\2=g')
|
# sed -E -e s'=(.*szeged/[0-9]/[0-9])(.*)(/.*)=\2=g')
|
||||||
|
|
||||||
|
# TODO: kuerzen
|
||||||
|
|
||||||
copy_necessary=1
|
copy_necessary=1
|
||||||
|
|
||||||
PERCENT=$((PERCENT+1))
|
PERCENT=$((PERCENT+1))
|
||||||
@ -167,89 +169,22 @@ check_md5_for_changed_json_and_ini_files () {
|
|||||||
# .../szeged/1/1...
|
# .../szeged/1/1...
|
||||||
log_debug "$func:${LINENO} checking file=${file}..."
|
log_debug "$func:${LINENO} checking file=${file}..."
|
||||||
local __fs=${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=""
|
js_key=""
|
||||||
|
|
||||||
case $file in
|
case $file in
|
||||||
*.ini | *.json | *.hex)
|
*.ini | *.json | *.hex)
|
||||||
|
|
||||||
set -x
|
|
||||||
local __key_suffix=$(echo $file |
|
local __key_suffix=$(echo $file |
|
||||||
sed -E -e 's=(.*[0-9]/[0-9])([^.]+)(.*)=\2=g' -e 's=/=.=g')
|
sed -E -e 's=(.*[0-9]/[0-9])([^.]+)(.*)=\2=g' -e 's=/=.=g')
|
||||||
js_key=".$__fs.$__cl.zg[$ZONE_GROUP].z[$ZONE]$__key_suffix"
|
js_key=".$__fs.$__cl.zg[$ZONE_GROUP].z[$ZONE]$__key_suffix"
|
||||||
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
|
md5sum_update_conf=$(cat $PSA_UPDATE_CONF | jq -r $js_key)
|
||||||
md5sum_repository="$(md5_of $CUSTOMER_ID_BASE_DIR/$file)"
|
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}"
|
log_crit "$func:${LINENO} unknown file=${file}"
|
||||||
;;
|
;;
|
||||||
esac
|
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
|
test -z $js_key && continue
|
||||||
|
|
||||||
PERCENT=$((PERCENT+1))
|
PERCENT=$((PERCENT+1))
|
||||||
|
Loading…
Reference in New Issue
Block a user