kernel/generate_all_configs.sh

37 lines
677 B
Bash
Raw Normal View History

#!/bin/sh
2019-11-05 22:10:53 +00:00
# Adjusts the configuration options to build the variants correctly
test -n "$RHTEST" && exit 0
2019-11-05 22:10:53 +00:00
DEBUGBUILDSENABLED=$1
if [ -z "$DEBUGBUILDSENABLED" ]; then
2019-11-05 22:10:53 +00:00
exit 1
fi
if [ -z "$FLAVOR" ]; then
FLAVOR=rhel
fi
if [ "$FLAVOR" = "fedora" ]; then
2019-11-05 22:10:53 +00:00
SECONDARY=rhel
else
SECONDARY=fedora
fi
for i in kernel-*-"$FLAVOR".config; do
NEW=kernel-"$SPECVERSION"-$(echo "$i" | cut -d - -f2- | sed s/-"$FLAVOR"//)
2019-11-05 22:10:53 +00:00
#echo $NEW
mv "$i" "$NEW"
done
2019-11-05 22:10:53 +00:00
rm -f kernel-*-"$SECONDARY".config
2019-11-05 22:10:53 +00:00
if [ "$DEBUGBUILDSENABLED" -eq 0 ]; then
2019-11-05 22:10:53 +00:00
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"
2019-11-05 22:10:53 +00:00
done
fi