On Apr 22, 2010, at 13:32, Pat Farrell wrote:

> I'm trying to wrap a standard sequence of steps in a shell script
> (linux/bash) and can't seem to figure out how to tell of the execution of
> 
> svn status
> 
> returned anything. For example
> 
> ~/sandbox/$svn status
> ?       pat/foo
> ~/sandbox/$echo $?
> 0
> 
> and if I delete the foo file, then the
> svn status
> return nothing, but the echo $? is still 0
> 
> I want to not do some steps if there are uncommiteed changes.


#!/bin/bash

if [ -z "$(svn st)" ]; then
    echo "working copy is pristine"
else
    echo "working copy has changes"
fi




Reply via email to