#!/usr/local/bin/clisp -norc -ansi -q -E utf-8

(load #P"~/quicklisp/setup.lisp")
(ql:quickload :com.informatimago.common-lisp.cesarum)
(use-package :com.informatimago.common-lisp.cesarum.stream)
(use-package :com.informatimago.common-lisp.cesarum.utility)

(defun main ()
 (let* ((lines (stream-to-string-list *standard-input*))
        (table (make-hash-table :test 'equal)))
   (loop :for (k v)
           :in (mapcar (lambda (line)
                         (let ((p (search "  " line)))
                           (list (subseq line 0 p)
                                 (subseq line (+ 2 p)))))
                       lines)
         :do (push v (gethash k table '())))
   (maphash (lambda (k vs)
              (unless (cdr vs)
                (remhash k table)))
            table)
   (maphash (lambda (k vs)
              (mapc 'delete-file (cdr vs)))
            table))
  #-testing (ext:exit 0))

(main)
ViewGit