From: Joseph Nuthalapati Date: Mon, 11 Jul 2022 08:59:09 +0000 (+0530) Subject: Remove babashka preloads X-Git-Url: https://njoseph.me/gitweb/babashka-scripts.git/commitdiff_plain/30f43df559bd79e663919dd8d957b36303c7a8d8 Remove babashka preloads --- diff --git a/README.md b/README.md index 6abd22a..fb44973 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,27 @@ Some tasks can also take arguments. bb ebook-to-audiobook the-great-gatsby.epub ``` -There are a utility file that makes running the tasks easier. Load it up first. -You can also add the following line with the absolute path to the file in your "~/.profile" file. +## Shell aliases ``` sh -source bb-aliases.sh +# bash, zsh +source /path/to/babashka-scripts/bb-aliases.sh +alias task = bb --config ~/dev/babashka-scripts/bb.edn + +# nu +source /path/to/babashka-scripts/bb-aliases.nu +alias task = bb --config ~/dev/babashka-scripts/bb.edn +``` + +*Example:* To pull all the repositories in a directory, run + +``` sh +task gpa . ``` +There is a utility `bbe` to run tasks in the current working directory in `bb-aliases.sh`. + + *Example:* To pull all the repositories in a directory, run ``` sh diff --git a/bb-aliases.nu b/bb-aliases.nu index 7519e2d..ed6c67a 100644 --- a/bb-aliases.nu +++ b/bb-aliases.nu @@ -1,8 +1,5 @@ #!/usr/bin/env nu -let-env BABASHKA_PRELOADS = '(doseq [fil ["lib.clj" "utils.clj"]] (load-file (str (System/getProperty "user.home") "/dev/babashka-scripts/scripts/" fil)))' -let-env BABASHKA_PRELOADS = $env.BABASHKA_PRELOADS + " (require '[utils :refer :all])" - def bbe [task] { bb -e $"\(run-task-in-cwd \'($task)\)" } diff --git a/bb-aliases.sh b/bb-aliases.sh index 5e82ad8..70349bb 100644 --- a/bb-aliases.sh +++ b/bb-aliases.sh @@ -1,8 +1,5 @@ #!/usr/bin/env bash -export BABASHKA_PRELOADS='(doseq [fil ["lib.clj" "utils.clj"]] (load-file (str (System/getProperty "user.home") "/dev/babashka-scripts/scripts/" fil)))' -export BABASHKA_PRELOADS=$BABASHKA_PRELOADS" (require '[utils :refer :all])" - bbe() { bb -e "(run-task-in-cwd \"$1\")" }