2 # Purges packages/ checkouts
3 # - if package has clean state, the dir is removed
4 # - otherwise git gc is called
7 topdir=$(rpm -E %_topdir)
8 purgedir=$topdir/purged
11 if [ -d "$purgedir" ]; then
12 echo >&2 "Previous pruge dir exists: $purgedir, remove it to resume"
20 status=$(git status -s)
22 # FIXME: does not currently handle if some pushes are not made!
23 if [ -n "$status" ]; then
25 * Package $pkg - Untracked files. Invoke gc
32 * Package $pkg - State clean. Removing