source: live-build/trunk/fuentes/debian/patches/ubuntu-fix-hooks.patch @ 900

Last change on this file since 900 was 900, checked in by kbut, 3 years ago

add original source

File size: 1.7 KB
  • scripts/build/lb_chroot_hooks

    Description: Fix hook execution
    Author: Colin Watson <cjwatson@ubuntu.com>
    Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685534
    Last-Update: 2012-08-21
    
    a b  
    5454do
    5555        for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks
    5656        do
    57                 if [ -e "${LOCATION}/hooks/???-${_HOOK}.binary" ]
    58                 then
    59                         mkdir -p chroot/root/lb_chroot_hooks
    60                         cp "${LOCATION}"/hooks/???-"${_HOOK}".chroot chroot/root/lb_chroot_hooks
    61                         continue
    62                 fi
     57                for FILE in "${LOCATION}"/???-"${_HOOK}".chroot
     58                do
     59                        if [ -e "${FILE}" ]
     60                        then
     61                                mkdir -p chroot/root/lb_chroot_hooks
     62                                cp "${FILE}" chroot/root/lb_chroot_hooks
     63                        fi
     64                done
    6365        done
    6466done
    6567
  • scripts/build/lb_binary_hooks

    a b  
    4343# Running hooks
    4444for _HOOK in ${LB_BINARY_HOOKS}
    4545do
    46                 for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks
     46        for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks
     47        do
     48                for FILE in "${LOCATION}"/???-"${_HOOK}".binary
    4749                do
    48                         if [ -e "${LOCATION}/hooks/???-${_HOOK}.binary" ]
     50                        if [ -e "${FILE}" ]
    4951                        then
    5052                                cd binary
    51                                 ./"${LOCATION}/hooks/???-${_HOOK}.binary" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
     53                                ./"${FILE}" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
    5254                                cd "${OLDPWD}"
    53 
    54                                 continue
    5555                        fi
    5656                done
     57        done
    5758done
    5859
    5960## Processing local hooks
Note: See TracBrowser for help on using the repository browser.