update: more rewrite

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-10-31 21:19:53 +01:00
parent 2e8601f36d
commit 340597400b

View File

@ -34,9 +34,9 @@ function getDSM() {
echo "${MODEL} ${VERSION:0:3} (${VERSION})" echo "${MODEL} ${VERSION:0:3} (${VERSION})"
echo "${PAT_URL}" echo "${PAT_URL}"
echo "${PAT_HASH}" echo "${PAT_HASH}"
echo " \"${VERSION}\":" >>"${TMP_PATH}/data.yml" echo " \"${VERSION}\":" >>"${TMP_PATH}/data.yml"
echo " url: \"${PAT_URL}\"" >>"${TMP_PATH}/data.yml" echo " url: \"${PAT_URL}\"" >>"${TMP_PATH}/data.yml"
echo " hash: \"${PAT_HASH}\"" >>"${TMP_PATH}/data.yml" echo " hash: \"${PAT_HASH}\"" >>"${TMP_PATH}/data.yml"
echo "" >>"${TMP_PATH}/webdata.txt" echo "" >>"${TMP_PATH}/webdata.txt"
echo "${MODEL} ${URLVER} (${VERSION})" >>"${TMP_PATH}/webdata.txt" echo "${MODEL} ${URLVER} (${VERSION})" >>"${TMP_PATH}/webdata.txt"
echo "Url: ${PAT_URL}" >>"${TMP_PATH}/webdata.txt" echo "Url: ${PAT_URL}" >>"${TMP_PATH}/webdata.txt"
@ -161,16 +161,14 @@ EXTRACTOR_PATH="${CACHE_PATH}/extractor"
EXTRACTOR_BIN="syno_extract_system_patch" EXTRACTOR_BIN="syno_extract_system_patch"
DSMPATH="${HOME}/dsm" DSMPATH="${HOME}/dsm"
FILESPATH="${HOME}/files" FILESPATH="${HOME}/files"
echo "model:" >"${TMP_PATH}/data.yml"
PREA="" PREA=""
while read -r M A; do while read -r M A; do
if [ "${PREA}" != "${A}" ]; then if [ "${PREA}" != "${A}" ]; then
echo " ${A}:" >>"${TMP_PATH}/data.yml" echo "${A}:" >>"${TMP_PATH}/data.yml"
PREA="${A}" PREA="${A}"
fi fi
MODEL=$(echo ${M} | sed 's/d$/D/; s/rp$/RP/; s/rp+/RP+/') MODEL=$(echo ${M} | sed 's/d$/D/; s/rp$/RP/; s/rp+/RP+/')
echo "\"${MODEL}\":" >>"${TMP_PATH}/data.yml" echo " \"${MODEL}\":" >>"${TMP_PATH}/data.yml"
echo " versions:" >>"${TMP_PATH}/data.yml"
getDSM "${MODEL}" "${A}" getDSM "${MODEL}" "${A}"
git config --global user.email "info@auxxxilium.tech" git config --global user.email "info@auxxxilium.tech"
git config --global user.name "AuxXxilium" git config --global user.name "AuxXxilium"