diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-05-04 10:52:19 +0200 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-05-04 10:52:19 +0200 |
commit | c4067996d9841671926f4b9a3e2c3ecd2ef5d36a (patch) | |
tree | d0958bad6d3249a39743fe48b855f19a68bca7d3 | |
parent | 830a2f97e258de184197737fef050dc13578b0dc (diff) | |
download | mkinitcpio-c4067996d9841671926f4b9a3e2c3ecd2ef5d36a.tar.gz mkinitcpio-c4067996d9841671926f4b9a3e2c3ecd2ef5d36a.tar.xz |
Swapped out 'quiet' parameter - use -v for verbose output
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@60 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r-- | mkinitcpio | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -24,7 +24,7 @@ MODULE_FILE="" SAVELIST="" GENIMG="" APPEND="" -QUIET="n" +QUIET="y" APPNAME=$(basename "${0}") @@ -37,7 +37,7 @@ usage () echo " -b BASEDIR Use BASEDIR. default: /" echo " -g IMAGE Generate a cpio image as IMAGE. default: no" echo " -a NAME Append to an existing filelist. default: no" - echo " -q Quiet output. Default: no" + echo " -v Verbose output. Default: no" echo " -H HOOKNAME Output help for hook 'HOOKNAME'." echo " -h This message." exit 1 @@ -51,7 +51,7 @@ while getopts 'c:k:s:b:g:a:qH:h' arg; do b) BASEDIR="$OPTARG" ;; g) GENIMG="$OPTARG" ;; a) APPEND="y" FILELIST="$OPTARG" ;; - q) QUIET="y" ;; + v) QUIET="n" ;; H) source "${INSTDIR}/${OPTARG}"; echo "Help for hook '${OPTARG}':" help @@ -101,6 +101,7 @@ else fi source "${FUNCTIONS}" +echo ":: Begin build" #parse 'global' hook, as defined in ${CONFIG} parse_hook @@ -111,13 +112,14 @@ for hook in $HOOKS; do install () { msg "${hook}: no install function..."; } if grep "install" "${INSTDIR}/${hook}" >/dev/null 2>&1; then source "${INSTDIR}/${hook}" - msg ":: Parsing hook [${hook}]" + echo ":: Parsing hook [${hook}]" install parse_hook fi done if [ "${HAS_MODULES}" == "y" ]; then + echo ":: Generating module dependancies" [ -e /tmp${MODULEDIR}/ ] && rm -r /tmp${MODULEDIR}/ cp --parents $(grep "file /lib/modules" ${FILELIST} | awk '{print $2}') /tmp/ depmod -b /tmp ${KERNELVERSION} @@ -127,13 +129,18 @@ if [ "${HAS_MODULES}" == "y" ]; then fi if [ "x$GENIMG" != "x" ]; then + echo -n "::Generating image '${GENIMG}'..." if ! gen_init_cpio ${FILELIST} | gzip -9 > "${GENIMG}"; then - err "Failed to create '${GENIMG}' image" + echo "FAILED" + else + echo "SUCCESS" fi if [ "x${SAVELIST}" == "x" ]; then rm ${FILELIST} fi +else + echo ":: Dry run complete, use -g IMAGE to generate a real image" fi [ -e "${MODULE_FILE}" ] && rm "${MODULE_FILE}" #vim:set ft=sh ts=4 sw=4 noet: |