Skip to content

Commit

Permalink
remove unused and/or problematic code
Browse files Browse the repository at this point in the history
  • Loading branch information
philwalk committed Feb 17, 2024
1 parent 4ab1f2f commit a4e32b0
Show file tree
Hide file tree
Showing 36 changed files with 1,763 additions and 2,305 deletions.
36 changes: 20 additions & 16 deletions jsrc/bashPath.sc
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
#!/usr/bin/env -S scala
//package vastblue.demo

//> using scala "3.3.1"
//> using lib "org.vastblue::pallet::0.10.6"
//> using lib "org.vastblue::pallet::0.10.7"

import vastblue.pallet.*

lazy val bashPath = where("bash").path
object BashPath {
val bashPath = where("bash").path

def main(args: Array[String]): Unit =
printf("userhome: [%s]\n", userhome)
import scala.sys.process.*
val progname = if (isWindows) {
"where.exe"
} else {
"which"
def main(args: Array[String]): Unit = {
printf("userhome: [%s]\n", userhome)
import scala.sys.process.*
val progname = if (isWindows) {
"where.exe"
} else {
"which"
}
val whereBash = Seq(progname, "bash").lazyLines_!.take(1).mkString
printf("first bash in path:\n%s\n", whereBash)
printf("%s\n", bashPath)
printf("%s\n", bashPath.realpath)
printf("%s\n", bashPath.toRealPath())
printf("shellRoot: %s\n", shellRoot)
printf("sys root: %s\n", where("bash").posx.replaceAll("(/usr)?/bin/bash.*", ""))
}
val whereBash = Seq(progname, "bash").lazyLines_!.take(1).mkString
printf("first bash in path:\n%s\n", whereBash)
printf("%s\n", bashPath)
printf("%s\n", bashPath.realpath)
printf("%s\n", bashPath.toRealPath())
printf("posixroot: %s\n", posixroot)
printf("sys root: %s\n", where("bash").norm.replaceAll("(/usr)?/bin/bash.*", ""))
}
4 changes: 2 additions & 2 deletions jsrc/bashPathCli.sc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S scala-cli shebang

//> using scala "3.3.1"
//> using lib "org.vastblue::pallet::0.10.6"
//> using lib "org.vastblue::pallet::0.10.7"

import vastblue.pallet.*

Expand All @@ -21,6 +21,6 @@ def main(args: Array[String]): Unit =
printf("%s\n", bashPath.realpath)
printf("%s\n", bashPath.toRealPath())
printf("posixroot: %s\n", posixroot)
printf("sys root: %s\n", where("bash").norm.replaceAll("(/usr)?/bin/bash.*", ""))
printf("sys root: %s\n", where("bash").posx.replaceAll("(/usr)?/bin/bash.*", ""))

main(args)
Loading

0 comments on commit a4e32b0

Please sign in to comment.