2016-11-10 18:16:25 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2019-11-05 22:10:53 +00:00
|
|
|
# Adjusts the configuration options to build the variants correctly
|
|
|
|
#
|
|
|
|
# arg1: configuration to go in the primary variant
|
|
|
|
# arg2: are we only generating debug configs
|
|
|
|
|
|
|
|
|
|
|
|
PRIMARY=$1
|
|
|
|
DEBUGBUILDSENABLED=$2
|
|
|
|
|
2020-10-12 13:20:43 +00:00
|
|
|
if [ -z "$2" ]; then
|
2019-11-05 22:10:53 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-08-24 14:10:00 +00:00
|
|
|
if [ -z "$PRIMARY" ]; then
|
|
|
|
PRIMARY=rhel
|
|
|
|
fi
|
|
|
|
|
2020-10-12 13:20:43 +00:00
|
|
|
if [ "$PRIMARY" = "fedora" ]; then
|
2019-11-05 22:10:53 +00:00
|
|
|
SECONDARY=rhel
|
|
|
|
else
|
|
|
|
SECONDARY=fedora
|
|
|
|
fi
|
|
|
|
|
2020-10-12 13:20:43 +00:00
|
|
|
for i in kernel-*-"$PRIMARY".config; do
|
|
|
|
NEW=kernel-"$VERSION"-$(echo "$i" | cut -d - -f2- | sed s/-"$PRIMARY"//)
|
2019-11-05 22:10:53 +00:00
|
|
|
#echo $NEW
|
2020-10-12 13:20:43 +00:00
|
|
|
mv "$i" "$NEW"
|
2016-11-10 18:16:25 +00:00
|
|
|
done
|
2019-11-05 22:10:53 +00:00
|
|
|
|
2020-10-12 13:20:43 +00:00
|
|
|
rm -f kernel-*-"$SECONDARY".config
|
2019-11-05 22:10:53 +00:00
|
|
|
|
2020-10-12 13:20:43 +00:00
|
|
|
if [ "$DEBUGBUILDSENABLED" -eq 0 ]; then
|
2019-11-05 22:10:53 +00:00
|
|
|
for i in kernel-*debug*.config; do
|
2020-10-12 13:20:43 +00:00
|
|
|
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
|