kernel/SOURCES/generate_all_configs.sh

37 lines
677 B
Bash
Raw Normal View History

2022-05-17 10:24:55 +00:00
#!/bin/sh
# Adjusts the configuration options to build the variants correctly
2023-05-09 05:36:29 +00:00
test -n "$RHTEST" && exit 0
2022-05-17 10:24:55 +00:00
2023-05-09 05:36:29 +00:00
DEBUGBUILDSENABLED=$1
if [ -z "$DEBUGBUILDSENABLED" ]; then
2022-05-17 10:24:55 +00:00
exit 1
fi
2023-05-09 05:36:29 +00:00
if [ -z "$FLAVOR" ]; then
FLAVOR=rhel
2022-05-17 10:24:55 +00:00
fi
2023-05-09 05:36:29 +00:00
if [ "$FLAVOR" = "fedora" ]; then
2022-05-17 10:24:55 +00:00
SECONDARY=rhel
else
SECONDARY=fedora
fi
2023-05-09 05:36:29 +00:00
for i in kernel-*-"$FLAVOR".config; do
NEW=kernel-"$SPECVERSION"-$(echo "$i" | cut -d - -f2- | sed s/-"$FLAVOR"//)
2022-05-17 10:24:55 +00:00
#echo $NEW
mv "$i" "$NEW"
done
rm -f kernel-*-"$SECONDARY".config
if [ "$DEBUGBUILDSENABLED" -eq 0 ]; then
for i in kernel-*debug*.config; do
base=$(echo "$i" | sed -r s/-?debug//g)
NEW=kernel-$(echo "$base" | cut -d - -f2-)
mv "$i" "$NEW"
done
fi