Skip to content

Instantly share code, notes, and snippets.

@junaruga
Created September 26, 2022 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save junaruga/22454a6a03951f32c7aa257f6867836a to your computer and use it in GitHub Desktop.
Save junaruga/22454a6a03951f32c7aa257f6867836a to your computer and use it in GitHub Desktop.
Check the compatibily of the variables in redhat-rpm-config macros
#!/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