# HG changeset patch # User Christian Mesh # Date 1337136515 18000 # Node ID ddb3c10c0a4b2d53419abe4dff52afcb213a0da6 # Parent 07f5864f07a214a656649e5dc522e86809eeab7d Change: use debug function in spk-add diff -r 07f5864f07a2 -r ddb3c10c0a4b spk-add --- a/spk-add Tue May 15 21:42:35 2012 -0500 +++ b/spk-add Tue May 15 21:48:35 2012 -0500 @@ -124,7 +124,7 @@ files_to_remove="$files_to_remove $file" done fi - [ "$debug" ] && echo "DEBUG: file_to_remove: $files_to_remove" + debug "file_to_remove: $files_to_remove" # Create list of all possibly modified files local file_list @@ -133,10 +133,11 @@ [ -d "${root}${i}" ] && continue file_list="$file_list $i" done - [ "$debug" ] && echo "DEBUG: file_list is set" + + debug "file_list is set" # Check possibly modified files against other packages files.list - [ "$debug" ] && echo "DEBUG: check modified files" + debug "check modified files" for file in $file_list do filegrep=$(egrep ^${file}$ $installed/*/files.list) @@ -153,8 +154,7 @@ fi # Add $pkg to the modifiers list og $name if ! egrep -q ^${package_name}$ $installed/$name/modifiers; then - [ "$debug" ] && \ - echo -en "\nDEBUG: Added $pkg to: $name/modifiers" + debug "Added $pkg to: $name/modifiers" echo "$package_name" >> $installed/$name/modifiers fi status