Blame SOURCES/generate_all_configs.sh

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