aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2026-01-10 11:24:10 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2026-01-10 11:24:10 -0500
commitf6c37dd7a57994e42b48151861d5de2a76195e61 (patch)
tree30865516826dfe85d10043ce55d26d5988bf5571
parentff4ff821374ad849224e5cae4f408244bfc6ed70 (diff)
downloaddotfiles-f6c37dd7a57994e42b48151861d5de2a76195e61.tar.gz
dotfiles-f6c37dd7a57994e42b48151861d5de2a76195e61.tar.xz
Tweaks for nvim and ssh agent on busybox/musl based Linux systems
-rwxr-xr-xcompile/nvim.sh11
-rw-r--r--kshrc12
2 files changed, 22 insertions, 1 deletions
diff --git a/compile/nvim.sh b/compile/nvim.sh
index be7903c..d1533fb 100755
--- a/compile/nvim.sh
+++ b/compile/nvim.sh
@@ -31,9 +31,18 @@ if ! [ -d "$nvimdir" ] ; then
git clone https://github.com/neovim/neovim "$nvimdir"
fi
+_extra_flags=''
+# Detectl musl libc and turn off LIBINTL
+for _f in /lib/ld-musl*so* ; do
+ if [ -e "$_f" ] ; then
+ _extra_flags="-DENABLE_LIBINTL=OFF"
+ break
+ fi
+done
+
cd "$nvimdir"
git clean -fdx .
rm -rf build || echo ""
-make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$HOME/.local" -j"$nproc"
+make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$HOME/.local $_extra_flags" -j"$nproc"
make install
cd -
diff --git a/kshrc b/kshrc
index 4f4d486..86a0d9c 100644
--- a/kshrc
+++ b/kshrc
@@ -346,6 +346,7 @@ checkSSHAgentForward() {
checkSSHAgent() {
if [ "$1" = "-k" ] ; then
pkill -9 ssh-agent
+ return
fi
# So OpenSSH 10.1 steps on my old configuration, rather than passing in -T
@@ -360,6 +361,17 @@ checkSSHAgent() {
#shellcheck disable=SC1090
. "$ssh_agent_conf"
fi
+
+ # We likely have busybox, assume we have to check /proc instead
+ if [ -L "$(command -v ps)" ] ; then
+ if ! [ -d /proc/"$SSH_AGENT_PID" ] ; then
+ ssh-agent -s | grep -v echo > "$ssh_agent_conf"
+ fi
+ #shellcheck disable=SC1090
+ . "$ssh_agent_conf"
+ return
+ fi
+
#shellcheck disable=SC2009
if ! ps aux | awk '{print $2}' | grep -q "$SSH_AGENT_PID" \
|| ! [ -e "$ssh_agent_conf" ] \