From 82abadcecc7534b4847238ee2a977f33256b0439 Mon Sep 17 00:00:00 2001
From: George Abbott <george@gabbott.dev>
Date: Sun, 26 Jan 2025 11:37:22 +0000
Subject: sh

---
 scripts/sh/update | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100755 scripts/sh/update

(limited to 'scripts/sh/update')

diff --git a/scripts/sh/update b/scripts/sh/update
new file mode 100755
index 0000000..5eda0dd
--- /dev/null
+++ b/scripts/sh/update
@@ -0,0 +1,17 @@
+#!/bin/sh
+# Updates all executables (i.e. all scripts and binaries here) to be in
+# PATH. Upon this script being run, all executables should be able to be found.
+# Executables are symlinked to $HOME/.local/bin.
+
+[ -z "$NEODOT_SCR" ] && echo "NEODOT_SCR not set" && exit
+[ -z "$NEODOT_SH" ] && echo "NEODOT_SH not set" && exit
+# todo: add $NEODOT_C envvar.
+
+mkdir -p "$HOME/.local/bin"
+
+# Update all in sh
+find $NEODOT_SH -type f -exec sh -c 'ln -sf "{}" $HOME/.local/bin/$(basename {})' \;
+
+# Build all executables
+odin build $NEODOT_SCR/jezup -out:$NEODOT_SCR/target/jezup
+odin build $NEODOT_SCR/dexter -out:$NEODOT_SCR/target/dexter
-- 
cgit v1.2.1