Blame SOURCES/generate_all_configs.sh

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