From 0958c0bcbad1a9db223225b9e69247e6b9c7a80c Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 25 Apr 2006 21:57:18 +0000 Subject: git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@14 880c04e9-e011-0410-abf7-b926e227c9cd --- mkinitcpio | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'mkinitcpio') diff --git a/mkinitcpio b/mkinitcpio index d862753..0056ec7 100644 --- a/mkinitcpio +++ b/mkinitcpio @@ -82,8 +82,13 @@ fi source "${CONFIG}" if [ -f "${FILELIST}" -a "x${APPEND}" == "x" ]; then - echo "destination file list '${FILELIST}' exists - remove before running" - exit 1 + if [ "x${SAVELIST}" == "x" ]; then + rm ${FILELIST} + touch "${FILELIST}" + else + echo "destination file list '${FILELIST}' exists - remove before running" + exit 1 + fi elif [ -f "${DESTIMG}" ]; then echo "destination image '${DESTIMG}' exists - remove before running" exit 1 @@ -100,16 +105,11 @@ for hook in $HOOKS; do unset BINARIES unset FILES install () { msg "${hook}: no install function..."; } - if grep "install ()" "${INSTDIR}/${hook}" /dev/null 2>&1; then + if grep "install" "${INSTDIR}/${hook}" /dev/null 2>&1; then source "${INSTDIR}/${hook}" install parse_hook fi - #quick test to check for existance... need a better way... - # note, this will only pick up valid run_hooks - a space is required - if grep "run_hook ()" "${HOOKDIR}/${hook}" 2>&1>/dev/null; then - add_file "${HOOKDIR}/${hook}" "/hooks/${hook}" - fi done if [ "${HAS_MODULES}" == "y" ]; then -- cgit v1.2.3-24-g4f1b