@@ -8,7 +8,7 @@ set -eufo pipefail
88IFS=$' \n\t '
99
1010help_text () {
11- sed -ne ' /^#/!q;s/.\{1,2\}//;1d;p' < " $0 "
11+ sed -ne ' /^#/!q;s/.\{1,2\}//;1d;p' < " $0 "
1212}
1313
1414compute_sha2 () {
@@ -27,7 +27,7 @@ download_and_verify() {
2727 local file=" $2 "
2828 local expected=" $3 "
2929 download_package " $url " " $file " || return $?
30- checksum=" $( compute_sha2 < " $file " ) "
30+ checksum=" $( compute_sha2 < " $file " ) "
3131 if [ " $checksum " != " $expected " ]; then
3232 {
3333 echo " Error: $url doesn't match its checksum:"
@@ -64,7 +64,7 @@ verify() {
6464 url=" ${url%#* } "
6565 echo " Verifying checksum for $url "
6666 file=" ${TMPDIR:-/ tmp} /$checksum "
67- download_and_verify " $url " " $file " " $checksum " || (( status += 1 ))
67+ download_and_verify " $url " " $file " " $checksum " || (( status += 1 ))
6868 done < <( xargs cat | extract_urls)
6969
7070 if [ " $status " != 0 ]; then
@@ -74,23 +74,25 @@ verify() {
7474}
7575
7676case " ${1-} " in
77- ' ' )
78- { echo " COMMIT_RANGE or FILES required"
79- help_text
80- } >&2
81- exit 1;;
82- -h | --help )
77+ ' ' )
78+ {
79+ echo " COMMIT_RANGE or FILES required"
8380 help_text
84- ;;
85- - )
86- verify
87- ;;
88- -- )
89- echo " $@ " | verify
90- ;;
91- * )
92- echo " Verifying changes from $1 "
93- changed_files " $1 "
94- potentially_new_packages " $1 " | verify
95- ;;
81+ } >&2
82+ exit 1
83+ ;;
84+ -h | --help)
85+ help_text
86+ ;;
87+ -)
88+ verify
89+ ;;
90+ --)
91+ echo " $@ " | verify
92+ ;;
93+ * )
94+ echo " Verifying changes from $1 "
95+ changed_files " $1 "
96+ potentially_new_packages " $1 " | verify
97+ ;;
9698esac
0 commit comments