1#!/bin/sh
2# SPDX-License-Identifier: LGPL-2.1-or-later
3set -eu
4
5cd "${1:?}" && shift
6
7curl --fail -L -o syscall-list.txt 'https://raw.githubusercontent.com/hrw/syscalls-table/master/syscall-names.text'
8
9for arch in "$@"; do
10    curl --fail -L -o "syscalls-$arch.txt" "https://raw.githubusercontent.com/hrw/syscalls-table/master/tables/syscalls-$arch"
11done
12