1
0
forked from rpms/kernel
kernel/SOURCES/generate_all_configs.sh

37 lines
677 B
Bash
Raw Permalink Normal View History

2021-11-04 01:36:31 +00:00
#!/bin/sh
# Adjusts the configuration options to build the variants correctly
2023-03-28 09:07:44 +00:00
test -n "$RHTEST" && exit 0
2021-11-04 01:36:31 +00:00
2023-03-28 09:07:44 +00:00
DEBUGBUILDSENABLED=$1
if [ -z "$DEBUGBUILDSENABLED" ]; then
2021-11-04 01:36:31 +00:00
exit 1
fi
2023-03-28 09:07:44 +00:00
if [ -z "$FLAVOR" ]; then
FLAVOR=rhel
2021-11-04 01:36:31 +00:00
fi
2023-03-28 09:07:44 +00:00
if [ "$FLAVOR" = "fedora" ]; then
2021-11-04 01:36:31 +00:00
SECONDARY=rhel
else
SECONDARY=fedora
fi
2023-03-28 09:07:44 +00:00
for i in kernel-*-"$FLAVOR".config; do
NEW=kernel-"$SPECVERSION"-$(echo "$i" | cut -d - -f2- | sed s/-"$FLAVOR"//)
2021-11-04 01:36:31 +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