summaryrefslogtreecommitdiffstats
path: root/mkinitcpio
diff options
context:
space:
mode:
Diffstat (limited to 'mkinitcpio')
-rwxr-xr-xmkinitcpio11
1 files changed, 10 insertions, 1 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 3e3b684..c97f93d 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -54,6 +54,7 @@ usage: $APPNAME [options]
-s Save build directory. default: no
-t TMPDIR Use TMPDIR as the temporary build directory.
-v Verbose output. Default: no.
+ -z COMPRESS Use COMPRESS on resulting image
EOF
cleanup
@@ -99,7 +100,7 @@ get_kernver() {
trap sighandler TERM INT
-while getopts ':c:k:sb:g:p:m:nvH:LMhS:t:' arg; do
+while getopts ':c:k:sb:g:p:m:nvH:LMhS:t:z:' arg; do
case "${arg}" in
c) CONFIG="${OPTARG}" ;;
k) optkver=$OPTARG ;;
@@ -125,6 +126,7 @@ while getopts ':c:k:sb:g:p:m:nvH:LMhS:t:' arg; do
exit 0 ;;
M) SHOW_AUTOMODS=1 ;;
t) TMPDIR=$OPTARG ;;
+ z) optcompress=$OPTARG ;;
h|?) usage ;;
:) echo "${OPTARG} requires a value..."; usage ;;
esac
@@ -256,11 +258,18 @@ if (( SHOW_AUTOMODS )); then
exit 0
fi
+
if [[ -z $GENIMG ]]; then
msg "Starting dry run: %s" "$KERNELVERSION"
else
+ COMPRESSION=${optcompress:-$COMPRESSION}
+ if ! type -P "$COMPRESSION" >/dev/null; then
+ die "Unable to locate compression method: %s" "$optcompress"
+ fi
+
msg "Starting build: %s" "$KERNELVERSION"
fi
+
#parse 'global' hook, as defined in ${CONFIG}
parse_hook