summaryrefslogtreecommitdiffstats
path: root/generate_all_configs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'generate_all_configs.sh')
-rwxr-xr-xgenerate_all_configs.sh34
1 files changed, 32 insertions, 2 deletions
diff --git a/generate_all_configs.sh b/generate_all_configs.sh
index dde72eaff..14f0f3a24 100755
--- a/generate_all_configs.sh
+++ b/generate_all_configs.sh
@@ -1,6 +1,36 @@
#!/bin/sh
-for i in kernel-*.config; do
- NEW=kernel-$VERSION-`echo $i | cut -d - -f2-`
+# 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 [ $PRIMARY == "fedora" ]; then
+ SECONDARY=rhel
+else
+ SECONDARY=fedora
+fi
+
+for i in kernel-*-$PRIMARY.config; do
+ NEW=kernel-$VERSION-`echo $i | cut -d - -f2- | sed s/-$PRIMARY//`
+ #echo $NEW
mv $i $NEW
done
+
+rm kernel-*-$SECONDARY.config
+
+if [ $DEBUGBUILDSENABLED -eq 0 ]; then
+ for i in kernel-*debug*.config; do
+ base=`echo $i | sed -r s/-?debug//g`
+ NEW=kernel-`echo $base | cut -d - -f2-`
+ mv $i $NEW
+ done
+fi