Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial commit, tested on Windows

  • Loading branch information...
commit 63ebde192aadd90d0a625656fbdd0c2cb01f9f41 1 parent e15bf93
Marko Elezović authored
View
7 .gitignore
@@ -0,0 +1,7 @@
+.classpath
+.project
+
+project
+target
+
+sbt-launch-*.jar
View
10 README.md
@@ -1,4 +1,12 @@
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
24 UNLICENSE
@@ -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
31 XsbtShPlugin.scala
@@ -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
13 build.sbt
@@ -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")
View
BIN  gruj_vs_sbt-launch-0.12.2.jar
Binary file not shown
View
1  sbt.sh.bat
@@ -0,0 +1 @@
+java -jar gruj_vs_sbt-launch-0.12.2.jar
Please sign in to comment.
Something went wrong with that request. Please try again.