Permalink
Browse files

Initial commit, tested on Windows

  • Loading branch information...
1 parent e15bf93 commit 3467c53e86eed3a87ceb4455a5718056eb74660a @melezov committed Apr 3, 2013
Showing with 84 additions and 1 deletion.
  1. +7 −0 .gitignore
  2. +8 −1 README.md
  3. +24 −0 UNLICENSE
  4. +31 −0 XsbtShPlugin.scala
  5. +13 −0 build.sbt
  6. BIN gruj_vs_sbt-launch-0.12.2.jar
  7. +1 −0 sbt.sh.bat
View
@@ -0,0 +1,7 @@
+.classpath
+.project
+
+project
+target
+
+sbt-launch-*.jar
View
@@ -1,4 +1,11 @@
xsbt-sh
=======
-Tiny XSBT plugin which adds functionality to run shell actions
+Tiny XSBT plugin which adds functionality to run shell actions
+Inspired by: https://github.com/steppenwells/sbt-sh
+
+Published against SBT 0.12.x
+
+ resolvers += "Element Releases" at "http://repo.element.hr/nexus/content/repositories/releases/"
+
+ addSbtPlugin("hr.element.xsbt" % "xsbt-sh" % "0.0.1")
View
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>
View
@@ -0,0 +1,31 @@
+package hr.element.xsbt
+
+import sbt._
+import Keys._
+
+object XsbtShPlugin extends Plugin {
+ override lazy val settings = Seq(
+ commands ++= Seq(
+ shCommand
+ )
+ )
+
+ sealed abstract class OS(val execPrefix: String)
+ case object Windows extends OS("cmd /c")
+ case object Linux extends OS("/bin/sh")
+
+ lazy val OS =
+ sys.props.get("os.name") match {
+ case Some(x) if x.toLowerCase contains "windows" =>
+ Windows
+
+ case _ =>
+ Linux
+ }
+
+ lazy val shCommand =
+ Command.args("sh", "<shell command>") { (state, args) =>
+ OS.execPrefix + ' ' + (args mkString " ")!;
+ state
+ }
+}
View
@@ -0,0 +1,13 @@
+sbtPlugin := true
+
+name := "xsbt-sh"
+
+version := "0.0.1"
+
+organization := "hr.element.xsbt"
+
+publishTo := Some("Element Releases" at "http://repo.element.hr/nexus/content/repositories/releases/")
+
+credentials += Credentials(Path.userHome / ".config" / "xsbt-sh" / "nexus.config")
+
+CrossBuilding.crossSbtVersions := Seq("0.12")
Binary file not shown.
View
@@ -0,0 +1 @@
+java -jar gruj_vs_sbt-launch-0.12.2.jar

0 comments on commit 3467c53

Please sign in to comment.