Created
September 26, 2022 15:44
-
-
Save junaruga/22454a6a03951f32c7aa257f6867836a to your computer and use it in GitHub Desktop.
Check the compatibily of the variables in redhat-rpm-config macros
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
rpm -q redhat-rpm-config | |
var_names=" | |
_general_options | |
__global_compiler_flags | |
optflags | |
extension_cflags | |
extension_cxxflags | |
extension_fflags | |
extension_ldflags | |
build_cflags | |
build_cxxflags | |
build_fflags | |
build_ldflags | |
redhat_rpm_compiler_flags | |
redhat_rpm_ldflags | |
" | |
for name in ${var_names}; do | |
value=$(rpm -E "%${name}") | |
echo "== ${name} ==" | |
rm -f tmp_${name}.txt | |
for arg in $value; do | |
echo " $arg" >> tmp_${name}.txt | |
done | |
LC_ALL=C sort tmp_${name}.txt | |
rm -f tmp_${name}.txt | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment