/***
scalaVersion := "2.10.0"

libraryDependencies ++= Seq("com.github.scala-incubator.io" %% "scala-io-file" % "0.4.2")
*/
object Main extends App {
  import sys.process._
    import scalax.file._
  ("git ls-files -s" #| "gawk '/120000/{print $4}'").lines.foreach { path =>
    val fromPath = Path.fromString(path)
    s"git checkout $path".!!
    val toPath = (fromPath / ".." / fromPath.string).toRealPath()
    if (toPath.isFile){
      s"git update-index --assume-unchanged $path".!!
      fromPath.write(toPath.bytes)
    }
  }
}
                             
        
        
  
Processing...
[info] Loading project definition from /var/tmp/renderertG8G85s8GH/project/project
[info] Loading project definition from /var/tmp/renderertG8G85s8GH/project
[info] Set current project to rendererWorker (in build file:/var/tmp/renderertG8G85s8GH/)
[info] Reapplying settings...
[info] Set current project to rendererWorker (in build file:/var/tmp/renderertG8G85s8GH/)
[info] Formatting 1 Scala source {file:/var/tmp/renderertG8G85s8GH/}rendererWorker(compile) ...
[error] Scalariform parser error: see compile for details
[info] Updating {file:/var/tmp/renderertG8G85s8GH/}rendererWorker...
[info] Resolving com.github.scala-incubator.io#scala-io-file_2.10;0.4.2 ...
[info] Resolving com.github.scala-incubator.io#scala-io-core_2.10;0.4.2 ...
[info] Resolving org.scala-lang#scala-library;2.10.0 ...
[info] Resolving com.jsuereth#scala-arm_2.10;1.3 ...
[info] Resolving org.scala-tools.sxr#sxr_2.10;0.2.8-SNAPSHOT ...
[info] Resolving org.scala-lang#scala-compiler;2.10.0 ...
[info] Resolving org.scala-lang#scala-reflect;2.10.0 ...
[info] Resolving com.foursquare.lint#linter_2.10;0.1-SNAPSHOT ...
[info] Done updating.
[info] Compiling 1 Scala source to /var/tmp/renderertG8G85s8GH/target/classes...
[warn] /var/tmp/renderertG8G85s8GH/src/main/scala/test.scala:7: Wildcard imports should be avoided.  Favor import selector clauses.
[warn]   import sys.process._
[warn]              ^
[warn] /var/tmp/renderertG8G85s8GH/src/main/scala/test.scala:8: Wildcard imports should be avoided.  Favor import selector clauses.
[warn]     import scalax.file._
[warn]                   ^
[warn] two warnings found
[success] Total time: 10 s, completed Mar 11, 2013 4:06:33 PM
Now running...
Killed because of timeout 30 seconds
[info] Formatting 1 Scala source {file:/var/tmp/renderertG8G85s8GH/}rendererWorker(compile) ...
[error] Scalariform parser error: see compile for details