X Tutup
Skip to content

Commit 7975857

Browse files
committed
tree-wide: use curl --fail
curl will save the 404 response page (or another error) if the page download fails, which we never want. Let it error out instead.
1 parent cfe01f7 commit 7975857

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/basic/linux/update.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ set -eu
44

55
for i in *.h */*.h; do
66
if [[ $i == 'loadavg.h' ]]; then
7-
curl https://raw.githubusercontent.com/torvalds/linux/master/include/linux/sched/$i -o $i
7+
curl --fail https://raw.githubusercontent.com/torvalds/linux/master/include/linux/sched/$i -o $i
88
else
9-
curl https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/$i -o $i
9+
curl --fail https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/$i -o $i
1010
fi
1111

1212
sed -i -e 's/__user //g' -e '/^#include <linux\/compiler.h>/ d' $i

tools/autosuspend-update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ set -eu
33

44
cd "$1"
55

6-
(curl -L 'https://chromium.googlesource.com/chromiumos/platform2/+/master/power_manager/udev/gen_autosuspend_rules.py?format=TEXT'; echo) \
6+
(curl --fail -L 'https://chromium.googlesource.com/chromiumos/platform2/+/master/power_manager/udev/gen_autosuspend_rules.py?format=TEXT'; echo) \
77
| base64 -d > gen_autosuspend_rules.py

tools/hwdb-update.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ if [ "${2:-}" != "-n" ]; then (
1515
[ -z "$permissive" ] || set +e
1616
set -x
1717

18-
curl -L -o usb.ids 'http://www.linux-usb.org/usb.ids'
19-
curl -L -o pci.ids 'http://pci-ids.ucw.cz/v2.2/pci.ids'
20-
curl -L -o ma-large.txt 'http://standards-oui.ieee.org/oui/oui.txt'
21-
curl -L -o ma-medium.txt 'http://standards-oui.ieee.org/oui28/mam.txt'
22-
curl -L -o ma-small.txt 'http://standards-oui.ieee.org/oui36/oui36.txt'
23-
curl -L -o pnp_id_registry.html 'https://uefi.org/uefi-pnp-export'
24-
curl -L -o acpi_id_registry.html 'https://uefi.org/uefi-acpi-export'
18+
curl --fail -L -o usb.ids 'http://www.linux-usb.org/usb.ids'
19+
curl --fail -L -o pci.ids 'http://pci-ids.ucw.cz/v2.2/pci.ids'
20+
curl --fail -L -o ma-large.txt 'http://standards-oui.ieee.org/oui/oui.txt'
21+
curl --fail -L -o ma-medium.txt 'http://standards-oui.ieee.org/oui28/mam.txt'
22+
curl --fail -L -o ma-small.txt 'http://standards-oui.ieee.org/oui36/oui36.txt'
23+
curl --fail -L -o pnp_id_registry.html 'https://uefi.org/uefi-pnp-export'
24+
curl --fail -L -o acpi_id_registry.html 'https://uefi.org/uefi-acpi-export'
2525
) fi
2626

2727
set -x

tools/syscall-table-update.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ set -eu
33

44
cd "$1" && shift
55

6-
curl -L -o syscall-names.text 'https://raw.githubusercontent.com/hrw/syscalls-table/master/syscall-names.text'
6+
curl --fail -L -o syscall-names.text 'https://raw.githubusercontent.com/hrw/syscalls-table/master/syscall-names.text'
77

88
for arch in "$@"; do
9-
curl -L -o syscalls-$arch "https://raw.githubusercontent.com/hrw/syscalls-table/master/tables/syscalls-$arch"
9+
curl --fail -L -o syscalls-$arch "https://raw.githubusercontent.com/hrw/syscalls-table/master/tables/syscalls-$arch"
1010
done

0 commit comments

Comments
 (0)
X Tutup