You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kernel-rt/SOURCES/generate_all_configs.sh

41 lines
758 B

#!/bin/sh
# 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
if [ -z "$2" ]; then
exit 1
fi
if [ -z "$PRIMARY" ]; then
PRIMARY=rhel
fi
if [ "$PRIMARY" = "fedora" ]; then
SECONDARY=rhel
else
SECONDARY=fedora
fi
for i in kernel-rt-*-"$PRIMARY".config; do
NEW=kernel-rt-"$VERSION"-$(echo "$i" | cut -d - -f3- | sed s/-"$PRIMARY"//)
#echo $NEW
mv "$i" "$NEW"
done
rm -f kernel-rt-*-"$SECONDARY".config
if [ "$DEBUGBUILDSENABLED" -eq 0 ]; then
for i in kernel-rt-*debug*.config; do
base=$(echo "$i" | sed -r s/-?debug//g)
NEW=kernel-rt-$(echo "$base" | cut -d - -f3-)
mv "$i" "$NEW"
done
fi