From f8bf91c25c9df5d657f8c6d29e5bdddbcbf6c802 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Thu, 13 Apr 2023 16:03:46 -0400 Subject: [PATCH] Maybe fixed now --- automation_tools/sha_update_list.cfg | 2 +- automation_tools/update_sha.sh | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/automation_tools/sha_update_list.cfg b/automation_tools/sha_update_list.cfg index 4c50bed1..6004513e 100644 --- a/automation_tools/sha_update_list.cfg +++ b/automation_tools/sha_update_list.cfg @@ -1,3 +1,3 @@ # The proper format for this file is # URL^PLACEHOLDERTEXT -https://buildbot.libretro.com/assets/cores/DOOM/Doom%20%28Shareware%29.zip^DOOMSHA \ No newline at end of file +https://buildbot.libretro.com/assets/cores/DOOM/Doom%20%28Shareware%29.zip^DOOMSHAPLACEHOLDER \ No newline at end of file diff --git a/automation_tools/update_sha.sh b/automation_tools/update_sha.sh index 6514e6a7..ad31d3ce 100644 --- a/automation_tools/update_sha.sh +++ b/automation_tools/update_sha.sh @@ -15,11 +15,13 @@ echo while IFS="^" read -r url placeholder do - echo - echo "Placeholder text: $placeholder" - echo "URL to hash: $url" - echo - hash=$(curl -sL "$url" | sha256sum | cut -d ' ' -f1) - echo "Hash found: $hash" - sed -i 's^'"$placeholder"'^'"$hash"'^' $rd_manifest + if [[ ! $url == "#"* ]]; then + echo + echo "Placeholder text: $placeholder" + echo "URL to hash: $url" + echo + hash=$(curl -sL "$url" | sha256sum | cut -d ' ' -f1) + echo "Hash found: $hash" + /bin/sed -i 's^'"$placeholder"'^'"$hash"'^' $rd_manifest + fi done < "$sha_update_list" \ No newline at end of file