[arch-projects] [mkinitcpio][PATCH 5/6] mkinitcpio: allow -S to be specified multiple times

Dave Reisner d at falconindy.com
Sat Mar 3 17:47:43 EST 2012


Signed-off-by: Dave Reisner <dreisner at archlinux.org>
---
 mkinitcpio       |    4 +++-
 mkinitcpio.8.txt |    1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/mkinitcpio b/mkinitcpio
index 9d59f0b..58979bf 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -120,7 +120,9 @@ while getopts ':c:k:sb:g:p:m:nvH:LMhS:t:z:' arg; do
         p) PRESET=$OPTARG ;;
         n) COLOR=0 ;;
         v) QUIET=0 ;;
-        S) IFS=, read -r -a SKIPHOOKS <<< "$OPTARG" ;;
+        S) IFS=, read -r -a skip <<< "$OPTARG"
+           SKIPHOOKS+=("${skip[@]}")
+           unset skip ;;
         H) if script=$(find_in_dirs "$OPTARG" "${INSTDIR[@]}"); then
                . "$script"
                if [[ $(type -t help) != function ]]; then
diff --git a/mkinitcpio.8.txt b/mkinitcpio.8.txt
index beb3e9c..eda5b58 100644
--- a/mkinitcpio.8.txt
+++ b/mkinitcpio.8.txt
@@ -64,6 +64,7 @@ Options
 
 *-S* 'hooks'::
 	Skip 'hooks' when generating the image. Several hooks should be comma-separated.
+	This option can be specified multiple times.
 
 *-s*::
 	Saves the build directory for the initial ramdisk. Default: no; This means
-- 
1.7.9.2



More information about the arch-projects mailing list