rpm-build/scripts/fixup-gnuconfig
Dmitry V. Levin 5e710ba046 Add fixup method: gnuconfig
Replaces all config.guess and config.sub files outside gnu-config
to symlinks leading to /usr/share/gnu-config/{config.guess,config.sub}.
2020-12-21 08:00:00 +00:00

20 lines
448 B
Bash
Executable File

#!/bin/sh -efu
#
# fixup-gnu-config - turn config.guess and config.sub files into symlinks.
#
# Copyright (C) 2020 Dmitry V. Levin <ldv@altlinux.org>
# All rights reserved.
#
# SPDX-License-Identifier: GPL-2.0-or-later
for f; do
[ ! -L "$f" ] && [ -f "$f" ] ||
continue
case "$f" in
*/gnu-config/*) continue ;;
*/config.guess | */config.sub) ;;
*) continue ;;
esac
ln -rsnfv ${RPM_BUILD_ROOT-}/usr/share/gnu-config/${f##*/} "$f"
done