Blame SOURCES/generate_all_configs.sh

e8eba4
#!/bin/sh
e8eba4
e8eba4
# Adjusts the configuration options to build the variants correctly
e8eba4
#
e8eba4
# arg1: configuration to go in the primary variant
e8eba4
# arg2: are we only generating debug configs
e8eba4
e8eba4
e8eba4
PRIMARY=$1
e8eba4
DEBUGBUILDSENABLED=$2
e8eba4
e8eba4
if [ -z "$2" ]; then
e8eba4
	exit 1
e8eba4
fi
e8eba4
e8eba4
if [ -z "$PRIMARY" ]; then
e8eba4
	PRIMARY=rhel
e8eba4
fi
e8eba4
e8eba4
if [ "$PRIMARY" = "fedora" ]; then
e8eba4
	SECONDARY=rhel
e8eba4
else
e8eba4
	SECONDARY=fedora
e8eba4
fi
e8eba4
e8eba4
for i in kernel-rt-*-"$PRIMARY".config; do
e8eba4
	NEW=kernel-rt-"$VERSION"-$(echo "$i" | cut -d - -f3- | sed s/-"$PRIMARY"//)
e8eba4
	#echo $NEW
e8eba4
	mv "$i" "$NEW"
e8eba4
done
e8eba4
e8eba4
rm -f kernel-rt-*-"$SECONDARY".config
e8eba4
e8eba4
if [ "$DEBUGBUILDSENABLED" -eq 0 ]; then
e8eba4
	for i in kernel-rt-*debug*.config; do
e8eba4
		base=$(echo "$i" | sed -r s/-?debug//g)
e8eba4
		NEW=kernel-rt-$(echo "$base" | cut -d - -f3-)
e8eba4
		mv "$i" "$NEW"
e8eba4
	done
e8eba4
fi