]> xenbits.xensource.com Git - people/dariof/osstest.git/commitdiff
mg-clear-git-caches: use mg-allocate -U
authorIan Jackson <iwj@woking.cam.xci-test.com>
Fri, 28 Jun 2013 10:28:21 +0000 (11:28 +0100)
committerIan Jackson <iwj@woking.cam.xci-test.com>
Fri, 28 Jun 2013 10:28:21 +0000 (11:28 +0100)
mg-clear-git-caches

index 3d4cd1521da1ba99eade2f0278a5c39b83d57317..5cab72714aef51047a069cb0a9d357599963871c 100755 (executable)
@@ -31,9 +31,13 @@ for lockfile in $cache/*/lock; do
        printf "===== %s =====\n" $host
        aside=$cache/$host.$$.`date +%s`.to-delete
        mkdir $aside
-       if ! ./mg-allocate $host; then continue; fi
+       if ! ./mg-allocate -U 10 $host; then continue; fi
+       set +e
        mv $hostdir $aside/.
+       r=$?
+       set -e
        ./mg-allocate !$host
+       if [ $r != 0 ]; then echo >&2 ' failed'; exit $r; fi
        printf ' deleting\n'
        sudo rm -rf $aside
 done