/
githubmirror
/
nss-altfiles
Обзор
Документация
Войти
/
githubmirror
/
nss-altfiles
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
updatefiles
44 строки
904 B
Adrian Perez de Castro
Bring up to date with glibc 2.39
30 апр 2024, 02:13
30 апр 2024, 02:13
8ba6d99
Код
Авторство
О чём код?
#! /bin/bash # # dlfiles # Copyright (C) 2013-2014 Adrian Perez <aperez@igalia.com> # # Distributed under terms of the MIT license. # set -eu declare -r DIST_URL_BASE='http://ftp.gnu.org/gnu/glibc/' if [[ $# -ne 1 ]] ; then cat <<-EOF Usage: $0 version EOF exit 1 fi 1>&2 PV_BIN=$(type -P pv) if [[ -n ${PV_BIN} ]] ; then pvcat () { "${PV_BIN}" -p -e -a "$1"; } else pvcat () { cat "$1"; } fi version=$1 if [[ ! -d glibc-${version} ]] ; then if [[ ! -r glibc-${version}.tar.xz ]] ; then wget "${DIST_URL_BASE}/glibc-${version}.tar.xz" fi echo "Unpacking glibc-${version}.tar.xz ..." pvcat glibc-${version}.tar.xz | tar -xJf - fi for dst_file in src/*/*.[hc] ; do dst_file_name=${dst_file##*/} src_file=$(find "glibc-${version}" -name "${dst_file_name}") if [[ -z ${src_file} ]] ; then echo "File '$dst_file_name' not found." 1>&2 else cp -v "${src_file}" "${dst_file}" fi done