Changeset 314 for trunk/confman.in


Ignore:
Timestamp:
05/02/2009 17:33:21 (3 years ago)
Author:
ccowart
Message:

Don't prompt for a commit message if no files have changed.

See #24

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/confman.in

    r312 r314  
    115115        conf_lock_wcopy 
    116116        local msg=$(conf_tmp_file) 
     117                local status=$(conf_tmp_file) 
    117118        local modules=$(conf_get_recipe | tr '\n' ',')  
    118119        local ignoreline="--This line, and those below, will be ignored--" 
     
    123124        echo "$ignoreline" >> $msg 
    124125        conf_get_recipe | tr ' ' '\n' | xargs -I % svn status \ 
    125             ${WORK_PATH}/% >> $msg 
    126         ${EDITOR} $msg 
     126            ${WORK_PATH}/% >> $status 
     127                cat $status >> $msg 
     128                if [ $(wc -l $status) -gt 0 ] ; then 
     129                ${EDITOR} $msg 
     130                fi 
     131                rm -f $status 
    127132        ${sed_cmd} -i '' -e '/'"$ignoreline"'/,$d' $msg 2>/dev/null 
    128133        $SUDO ${SUDO:+-v} 
     
    162167        conf_lock_system 
    163168        local msg=$(conf_tmp_file) 
     169        local status=$(conf_tmp_file) 
    164170        local modules=$(conf_get_recipe | tr '\n' ',') 
    165171        local ignoreline="---Everything after this line will be ignored---" 
     
    175181            files="$files $file" 
    176182        done 
    177         svn status $files >> $msg 
    178         ${EDITOR} $msg 
     183        svn status $files >> $status 
     184        cat $status >> $msg 
     185        if [ $(wc -l $status) ] ; then 
     186            ${EDITOR} $msg 
     187        fi 
     188        rm $status 
    179189        ${sed_cmd} -i '' -e '/'"$ignoreline"'/,$d' $msg 2>/dev/null 
    180190        $SUDO ${SUDO:+-v} 
Note: See TracChangeset for help on using the changeset viewer.