Try delete without sudo first.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 17 Apr 2013 20:31:47 +0000 (22:31 +0200)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 17 Apr 2013 20:31:47 +0000 (22:31 +0200)
mock.sh

diff --git a/mock.sh b/mock.sh
index 1d36c10..717eced 100755 (executable)
--- a/mock.sh
+++ b/mock.sh
@@ -143,7 +143,7 @@ release_sign() {
 while test -n "$1"; do
        case "$1" in
        clean)
-               sudo rm -rfv results
+               [ -d results ] && (rm -rfv results || sudo rm -rfv results)
                if test "$CONF" = "pbuilder"; then
                        rm -rfv $DEBREPO/stable $DEBREPO/unstable $DEBREPO/$DEBDISTRO $DEBREPO/*.db
                        mkdir -p $DEBREPO/$DEBDISTRO