From 88a7128ede87eddeb35ad311ff8c8a6d67e5957f Mon Sep 17 00:00:00 2001 From: 0b1kn00b Date: Sat, 20 Apr 2024 05:14:44 +0200 Subject: [PATCH] feat: localhost.path.show. removed nostromo --- .envrc | 20 +++++++------------ .../bertha/i/src/main/bb/bertha/util.clj | 12 +++++------ README.md | 15 +++++++------- bb.edn | 19 +++++++++--------- 4 files changed, 29 insertions(+), 37 deletions(-) diff --git a/.envrc b/.envrc index 5997077..205016a 100644 --- a/.envrc +++ b/.envrc @@ -1,28 +1,26 @@ -PRJ_DIR=$(pwd) -#echo "${PRJ_DIR}" -export BERTHA_PATH="${PRJ_DIR}" +export BERTHA_PATH="$(pwd)" dotenv .env.checked_in -PRJ_DIR=$(pwd) -local o="${PRJ_DIR}/.local/share/bertha/o/" +local prj_dir=$(pwd) +local o="${prj_dir}/.local/share/bertha/o/" local obin="${o}/bin" mkdir -p "$obin"; mkdir -p "$o/opt"; export PATH="${obin}":"${o}/var/clyde/inst/bin":"${o}/opt/haxe/":"${o}/opt/neko/":"${o}/opt/hashlink/":${PATH} -export BERTHA_PATH="${PRJ_DIR}" +export BERTHA_PATH="${prj_dir}" layout python3 # 2>&1 >/dev/null pip install -r requirements.txt >/dev/null -virtualenv ${PRJ_DIR}/.local/share/bertha/o/bertha_pyenv >/dev/null +virtualenv ${prj_dir}/.local/share/bertha/o/bertha_pyenv >/dev/null #install-release config --path="$BERTHA_PATH/.local/share/bertha/o" >/dev/null -# echo $PRJ_DIR +# echo $prj_dir if (! test -f "$obin/eget"); then curl -o eget.sh https://zyedidia.github.io/eget.sh sh eget.sh - mv $PRJ_DIR/eget $obin + mv $prj_dir/eget $obin rm eget.sh fi @@ -51,10 +49,6 @@ if (! test -f "$obin/clyde"); then clyde install mkcert 2>&1 >/dev/null fi -if (! test -f "$obin/nostromo"); then - eget https://github.com/pokanop/nostromo/ --to ${obin} -fi - if (! test -f "$obin/aim"); then eget https://github.com/mihaigalos/aim/ --asset="gnu" --to ${obin} fi diff --git a/.local/share/bertha/i/src/main/bb/bertha/util.clj b/.local/share/bertha/i/src/main/bb/bertha/util.clj index 4584fe1..18b3726 100644 --- a/.local/share/bertha/i/src/main/bb/bertha/util.clj +++ b/.local/share/bertha/i/src/main/bb/bertha/util.clj @@ -1,9 +1,9 @@ (ns bertha.util - ( - :require [cheshire.core :refer :all] - :require [babashka.fs :as fs] - ) -) + (:require [cheshire.core :refer :all] + :require [babashka.fs :as fs] + :require [clojure.string :as str] + :require [clojure.java.io :as io] +)) ;; (require [cheshire.core :refer :all]) ;; (require '[com.velisco/tagged :as tag]) @@ -13,7 +13,7 @@ (defn localhost.os.name [] (System/getProperty "os.name" )) (defn bertha.path [] (System/getenv "BERTHA_PATH")) (defn bertha.home [] (System/getenv "BERTHA_HOME")) - +(defn localhost.path.show [] (str/join "\n" (str/split (System/getenv "PATH") #":"))) (defn device.info [] {:arch (localhost.os.arch) :name (localhost.os.name)} ) diff --git a/README.md b/README.md index c14fa03..a744449 100644 --- a/README.md +++ b/README.md @@ -57,14 +57,13 @@ Below invocation should make available the following binaries. 3) [haxe](haxe.org) from [here](https://github.com/HaxeFoundation/haxe) 3) [babashka](babashka.org) from [here](https://github.com/babashka/babashka) 4) [rclone](rclone.org) from [here](https://github.com/rclone/rclone) -5) [nostromo](https://github.com/pokanop/nostromo/) -6) [clyde](https://github.com/agateau/clyde) -7) [ansible](https://ansible.readthedocs.io) -8) [xh](https://github.com/ducaale/xh) -9) [aim](https://github.com/mihaigalos/aim/) -10) [lefthook](https://github.com/evilmartians/lefthook) -11) [xc](https://github.com/joerdav/xc/) -12) [vagrant](https://github.com/hashicorp/vagrant/) +5) [clyde](https://github.com/agateau/clyde) +6) [ansible](https://ansible.readthedocs.io) +7) [xh](https://github.com/ducaale/xh) +8) [aim](https://github.com/mihaigalos/aim/) +9) [lefthook](https://github.com/evilmartians/lefthook) +10) [xc](https://github.com/joerdav/xc/) +11) [vagrant](https://github.com/hashicorp/vagrant/) # Support diff --git a/bb.edn b/bb.edn index efa7789..4224c5f 100644 --- a/bb.edn +++ b/bb.edn @@ -4,15 +4,14 @@ ] :deps {ohmrun/bertha {:local/root "."}} :tasks - { - :requires ([bertha.util]) - localhost.os.arch (println (bertha.util/localhost.os.arch)) - localhost.os.name (println (bertha.util/localhost.os.name)) - namespaces (print (all-ns)) - device.info (println (bertha.util/device.info)) - bertha.path (println (bertha.util/bertha.path)) - bertha.install bertha.install/main - bertha.softlink (bertha.util/bertha.softlink) - } + {:requires ([bertha.util]) + localhost.os.arch (println (bertha.util/localhost.os.arch)) + localhost.os.name (println (bertha.util/localhost.os.name)) + localhost.path.show (println (bertha.util/localhost.path.show)) + namespaces (print (all-ns)) + device.info (println (bertha.util/device.info)) + bertha.path (println (bertha.util/bertha.path)) + bertha.install bertha.install/main + bertha.softlink (bertha.util/bertha.softlink)} } ;; java.nio.file.Files/createSymbolicLink \ No newline at end of file