cookutils diff cook @ rev 962
cook: add cook_pick_docs() and COOKOPTS="skip-log-errors"; update doc.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Aug 31 03:14:01 2017 +0300 (2017-08-31) |
parents | 0f4636284a32 |
children | 96304f0412ca |
line diff
1.1 --- a/cook Wed Aug 02 18:44:51 2017 +0300 1.2 +++ b/cook Thu Aug 31 03:14:01 2017 +0300 1.3 @@ -816,10 +816,12 @@ 1.4 if [ ! -d "$WOK/$pkg/install" ] && [ -z "$WANTED" ]; then 1.5 _ 'ERROR: cook failed' | tee -a $LOGS/$pkg.log 1.6 fi 1.7 + 1.8 + [ "${COOKOPTS/skip-log-errors/}" != "$COOKOPTS" ] && return 0 1.9 + 1.10 # ERROR can be echoed any time in cookit() 1.11 - lerror=$(_n 'ERROR') 1.12 if grep -Ev "(conftest|configtest)" $LOGS/$pkg.log | \ 1.13 - grep -Eq "(^$lerror|undefined reference to)" ; then 1.14 + grep -Eq "(^ERROR|undefined reference to)" ; then 1.15 debug_info | tee -a $LOGS/$pkg.log 1.16 sed -i '$ s|$| [ Failed ]|' $activity 1.17 rm -f $command 1.18 @@ -1324,6 +1326,18 @@ 1.19 } 1.20 1.21 1.22 +# Function to use in compile_rules() to copy documentation from $src to $install 1.23 + 1.24 +cook_pick_docs() { 1.25 + local docdir="$install/usr/share/doc/$PACKAGE-$VERSION" 1.26 + action 'Copying documentation...' 1.27 + mkdir -p $docdir 1.28 + cp -r $@ $docdir 1.29 + chmod -R a+r $docdir 1.30 + status 1.31 +} 1.32 + 1.33 + 1.34 # Function to use in genpkg_rules() to copy specified files from $install to $fs 1.35 1.36 cook_copy_files() { 1.37 @@ -1987,9 +2001,9 @@ 1.38 clean_log 1.39 1.40 # Exit if any error in packing. 1.41 - lerror=$(_n 'ERROR') 1.42 - if grep -Ev "(/root/.cvspass|conftest|df: /|rm: can't remove)" $LOGS/$pkg.log | \ 1.43 - grep -Eq "(^$lerror|: No such file or directory|not remade because of errors|ake: \*\*\* .* Error)"; then 1.44 + if [ "${COOKOPTS/skip-log-errors/}" == "$COOKOPTS" ] && 1.45 + grep -Ev "(/root/.cvspass|conftest|df: /|rm: can't remove)" $LOGS/$pkg.log | \ 1.46 + grep -Eq "(^ERROR|: No such file or directory|not remade because of errors|ake: \*\*\* .* Error)"; then 1.47 debug_info | tee -a $LOGS/$pkg.log 1.48 sed -i '$ s|$| [ Failed ]|' $activity 1.49 rm -f $command