-
Notifications
You must be signed in to change notification settings - Fork 605
Description
The download URL for Wireshark is incorrect.
Current URL in script:
https://1.as.dl.wireshark.org/osx/Wireshark%20Latest%20Intel%2064.dmg
and
https://1.as.dl.wireshark.org/osx/Wireshark%20Latest%20Arm%2064.dmg
Correct URL:
https://2.na.dl.wireshark.org/osx/Wireshark%20Latest%20Intel%2064.dmg
and
https://2.na.dl.wireshark.org/osx/Wireshark%20Latest%20Arm%2064.dmg
Also, the appNewVersion command is not working correctly. There should be a -e after the xpath and before the query.
Re-building it could look like this:
wireshark)
name="Wireshark"
type="dmg"
appNewVersion=$(curl -fs "https://www.wireshark.org/update/0/Wireshark/4.0.0/macOS/x86-64/en-US/stable.xml" | xpath -e '(//rss/channel/item/enclosure/@sparkle:version)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2)
urlToParse=$(curl -fs "https://www.wireshark.org/update/0/Wireshark/4.0.0/macOS/x86-64/en-US/stable.xml" | xpath -e '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | head -1 | cut -d ':' -f 2 | cut -d '%' -f 1)
if [[ $(arch) == i386 ]]; then
downloadURL="https:$urlToParse%20Latest%20Intel%2064.dmg"
elif [[ $(arch) == arm64 ]]; then
downloadURL="https:$urlToParse%20Latest%20Arm%2064.dmg"
fi
expectedTeamID="7Z6EMTD2C6"
;;```