File enable_modules.sh of Package kernel-cult-dev

#!/bin/bash

# Check if .config file exists
if [ ! -f .config ]; then
    echo "Error: .config file not found!"
    exit 1
fi

# Check if modules.db file exists
if [ ! -f modules.db ]; then
    echo "Error: modules.db file not found!"
    exit 1
fi

# Read modules from modules.db file
MODULES=$(cat modules.db)

# Enable modules in .config file
for module in $MODULES; do
    grep -q "^CONFIG_$module=" .config && sed -i "s/^# CONFIG_$module is not set/CONFIG_$module=m/" .config || echo "CONFIG_$module=m" >> .config
done

echo "Modules enabled successfully."
openSUSE Build Service is sponsored by