Update update.sh

This commit is contained in:
Christian 2024-06-09 18:09:08 +02:00 committed by GitHub
parent 4071a9d01f
commit ee0e7648ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,8 +9,6 @@ function getDSM() {
PLATFORM="${2}" PLATFORM="${2}"
VERSIONS="$(readConfigEntriesArray "platforms.${PLATFORM}.productvers" "${P_FILE}" | sort -r)" VERSIONS="$(readConfigEntriesArray "platforms.${PLATFORM}.productvers" "${P_FILE}" | sort -r)"
echo "${VERSIONS}" >"${TMP_PATH}/versions" echo "${VERSIONS}" >"${TMP_PATH}/versions"
[ -f "${TMP_PATH}/dsmdata.yml" ] && rm -f "${TMP_PATH}/dsmdata.yml"
touch "${TMP_PATH}/dsmdata.yml"
while IFS= read -r line; do while IFS= read -r line; do
VERSION="${line}" VERSION="${line}"
PAT_FILE="${MODEL}_${VERSION}.pat" PAT_FILE="${MODEL}_${VERSION}.pat"
@ -128,6 +126,7 @@ TMP_PATH="${HOME}/tmp"
mkdir -p "${TMP_PATH}" mkdir -p "${TMP_PATH}"
rm -f "${CONFIGS}" rm -f "${CONFIGS}"
mkdir -p "${CONFIGS}" mkdir -p "${CONFIGS}"
touch "${TMP_PATH}/dsmdata.yml"
TAG="$(curl --insecure -m 5 -s https://api.github.com/repos/AuxXxilium/arc-configs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')" TAG="$(curl --insecure -m 5 -s https://api.github.com/repos/AuxXxilium/arc-configs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')"
curl --insecure -s -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-configs/releases/download/${TAG}/configs.zip" -o "./configs.zip" curl --insecure -s -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-configs/releases/download/${TAG}/configs.zip" -o "./configs.zip"
unzip -oq "./configs.zip" -d "${CONFIGS}" >/dev/null 2>&1 unzip -oq "./configs.zip" -d "${CONFIGS}" >/dev/null 2>&1
@ -159,4 +158,4 @@ cp -f "${TMP_PATH}/dsmdata.yml" "${HOME}/dsmdata.yml"
# Cleanup DSM Files # Cleanup DSM Files
rm -rf "${CACHE_PATH}/dl" rm -rf "${CACHE_PATH}/dl"
rm -rf "${CONFIGS}" rm -rf "${CONFIGS}"
rm -rf "${TMP_PATH}" rm -rf "${TMP_PATH}"