summaryrefslogtreecommitdiff
path: root/SOURCES/generate_all_configs.sh
diff options
context:
space:
mode:
authorSentry <sentry@Sentry-Desktop-Fedora.local>2020-07-14 15:58:43 +0200
committerJan200101 <sentrycraft123@gmail.com>2020-12-05 19:40:07 +0100
commit391fe055c943e33e9c191dbeeb21995c0d54ccd9 (patch)
tree04bbfbe91a73cc0d47c2d70235c8ca365eaa9c3d /SOURCES/generate_all_configs.sh
downloadkernel-fsync-391fe055c943e33e9c191dbeeb21995c0d54ccd9.tar.gz
kernel-fsync-391fe055c943e33e9c191dbeeb21995c0d54ccd9.zip
kernel 5.7.8
Diffstat (limited to 'SOURCES/generate_all_configs.sh')
-rwxr-xr-xSOURCES/generate_all_configs.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/SOURCES/generate_all_configs.sh b/SOURCES/generate_all_configs.sh
new file mode 100755
index 0000000..14f0f3a
--- /dev/null
+++ b/SOURCES/generate_all_configs.sh
@@ -0,0 +1,36 @@
+#!/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 [ $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