   ([project] (println (help-for "protobuf")))
   ([project subtask & args]
      (case subtask
-       "install"   (apply install args)
-       "uninstall" (apply uninstall args)
+       "install"   (apply install project args)
+       "uninstall" (apply uninstall project args)
        "compile"   (apply compile project args))))
      (.mkdirs (.getParentFile f))
      (io/copy (.getInputStream zip entry) f))))

(defn- proto-dependencies "look for lines starting with import in proto-file"
  [proto-file]
  (for [line (line-seq (io/reader proto-file)) :when (.startsWith line "import")]
    (second (re-matches #".*\"(.*)\".*" line))))

(defn extract-dependencies "extract all files proto is dependent on"
  [proto-file]
  (loop [files (vec (proto-dependencies proto-file))]
    (when-not (empty? files)
      (let [proto (peek files)
            files (pop files)]
        (if (or (.exists (io/file "proto" proto))
                (.exists (io/file "build/proto" proto)))
          (recur files)
          (let [location (str "proto/" proto)
                proto-file (io/file "build" location)]
            (io/copy (io/reader (io/resource location)) proto-file)
            (recur (into files (proto-dependencies proto-file)))))))))

(defn modtime [dir]
  (let [files (rest (file-seq (io/file dir)))]
    (if (empty? files)
      0
      (apply max (map #(.lastModified %) files)))))

  (:import java.util.zip.ZipFile))

(def version "2.3.0")
(def srcdir  (str "protobuf-" version))
(def zipfile (format "protobuf-%s.zip" version))

(def url
  (java.net.URL.
   (format "http://protobuf.googlecode.com/files/protobuf-%s.zip"  version)))

(defn- unzip [source target-dir]
  (let [zip (ZipFile. source)
