       (ant Chmod {:file (file srcdir "install-sh") :perm "+x"})
       (ant ExecTask {:dir srcdir :executable "./configure"})
       (ant ExecTask {:dir srcdir :executable "make"}))
-    (let [password (prompt-read "Password" :echo false)]
-      (ant ExecTask {:dir srcdir :executable "sudo" :input-string (str password "\n")}
-           (args ["-S" "make" "install"])))))
+    (let [password (prompt-read "Password" :echo false)
+          opts     {:dir srcdir :input-string (str password "\n")}]
+      (if (= "linux "(os-name))
+        (ant ExecTask (assoc opts :executable "script")
+             (argline "-q -c 'sudo -S make install' /dev/null"))
+        (ant ExecTask (assoc opts :executable "sudo")
+             (args ["-S" "make" "install"]))))))
 
 (deftask uninstall-protoc
   "Remove protoc if it is installed."

  (:use cake cake.core cake.ant
        [cake.file :only [file]]
        [cake.project :only [log]]
        [cake.tasks.compile :only [compile-java]]
        [clojure.java.shell :only [sh]]
        [clojure.java.io :only [reader]]
        [cake.utils.io :only [extract-resource]])
  (:import [org.apache.tools.ant.taskdefs Chmod Copy Delete ExecTask Get Javac Mkdir Untar]))

(def version "2.3.0")
(def srcdir  (format "lib/protobuf-%s" version))

         (try (ant ExecTask {:executable "protoc" :dir "proto" :failonerror true}
                   (args [proto (str "--java_out=../" dest) "-I." "-I../build/proto"]))
              (catch org.apache.tools.ant.BuildException e
                (throw (Exception. (str "error compiling " proto))))))
       (compile-java (file dest)))))

