]> pd.if.org Git - zpackage/commitdiff
delete cached package files when deleting a repo
authorNathan Wagner <nw@hydaspes.if.org>
Sun, 9 Dec 2018 10:21:49 +0000 (10:21 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Sun, 9 Dec 2018 10:22:39 +0000 (10:22 +0000)
zpm-repo

index 0477952a6a4d17465066d5ced34bad920f533e79..737e9af46e7a79d26d9fd615c11b26f85263527a 100755 (executable)
--- a/zpm-repo
+++ b/zpm-repo
@@ -199,7 +199,7 @@ case $action in
                name=$(zpm quote "$1")
                zpm shell $ZPMDB "delete from repository where name = '$name'"
                rm -f $repodir/$1.repo
-               # TODO delete caches
+               test -d "$repodir/$repo" && rm -r "$repodir/$repo"
                ;;
        url)
                if [ -n "$2" ]; then