Skip to content

Commit b5bb835

Browse files
committed
update hashupdate script
1 parent add6458 commit b5bb835

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hashupdate

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/sh
2-
set -eu
2+
set -eu pipefail
33

44
# Usage: hashupdate <FILE> <NAME> <VERSION>
5-
URL_TEMPLATE=$(grep "$2_URL=" "$1" | sed -E 's/.*="(.*)"/\1/' | tr -d '\r')
5+
URL_TEMPLATE=$(grep "$2_URL=" "$1" | sed -E 's/.*="(.*)"/\1/')
66
URL=$(echo "$URL_TEMPLATE" | sed "s/\$$2_VERSION/$3/g")
77
SHA256=$(curl -sL "$URL" | sha256sum | sed -e 's/ -//g')
88
sed -i -E "s/$2_SHA256=.*/$2_SHA256=$SHA256/" "$1"

0 commit comments

Comments
 (0)