From fb8efc7425fca4fed457ceb4ca7e474ee2ffe380 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Wed, 8 Jun 2011 15:57:48 -0400 Subject: install/autodetect: refactor and simplify hook Bashify and refactor to cut back on unnecessary churn. Since our {all,checked}_modules functions always return clean module names, we can add these directly to the autodetect file instead of aggregating them during the autodetect hook and then cleansing one at a time. There's a small speed increase here for the simplest code path. Signed-off-by: Dave Reisner --- install/filesystems | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'install/filesystems') diff --git a/install/filesystems b/install/filesystems index 337a6a5..64227bc 100644 --- a/install/filesystems +++ b/install/filesystems @@ -1,21 +1,18 @@ -# vim: set ft=sh: +#!/bin/bash -build() -{ - if [ "${autodetect_fs_detection_failed}" = "1" ]; then - MODULES=" $(all_modules '/kernel/fs' | grep -v "nls")" +build() { + if (( fs_autodetect_failed )); then + MODULES=$(all_modules '/kernel/fs' | grep -v "nls") else - MODULES=" $(checked_modules '/kernel/fs' | grep -v "nls")" + MODULES=$(checked_modules '/kernel/fs' | grep -v "nls") fi - BINARIES="" - FILES="" - SCRIPT="" } -help () -{ -cat<