]> njoseph.me Git - babashka-scripts.git/blobdiff - README.md
utils: Install deb from GitHub. Reduce scripts.
[babashka-scripts.git] / README.md
index f02c678c1394f4d6d4152a2e505de2710c0a95dd..a5c24b4c1f7fb6e4dd0669dae6e606fe512ba42f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -18,10 +18,32 @@ git clone https://njoseph.me/gitweb/babashka-scripts.git
 Add the following lines to your shell configuration file.
 
 ``` sh
-export BABASHKA_PRELOADS='(load-file (str (System/getProperty "user.home") "/dev/babashka-scripts/lib.clj"))'
+export BABASHKA_PRELOADS='(run! load-file (map #(str (System/getProperty "user.home") "/dev/babashka-scripts/" %) ["lib.clj" "utils.clj"]))'
+export BABASHKA_PRELOADS=$BABASHKA_PRELOADS"  (require '[utils :refer :all])"
 export PATH=$PATH:$HOME/dev/babashka-scripts
 ```
 
+Some useful aliases and functions.
+
+``` sh
+alias gup="bb -e '(git-pull-rebase-branch)'"
+alias bbr="rlwrap bb --repl"
+
+function bb-wrap {
+  expr="($1 \"$2\")"
+  bb -e $expr
+}
+
+alias install-deb="bb-wrap install-deb"
+alias install-deb-gh="bb-wrap install-deb-from-GitHub"
+```
+
 ## Organization
 
-`lib.clj` contains functions that the other scripts might use. It must be loaded first.
+`lib.clj` contains functions that the other scripts might use. It must be loaded
+first.
+
+`utils.clj` contains standalone utilities that can be executed directly. These are
+convenient to use through shell aliases.
+
+The remaining Clojure files are executable scripts.