]> git.sev.monster Git - dotfiles.git/commitdiff
head all which, fix dmenu recursion, fix syncthing
authorsev <git@sev.monster>
Tue, 12 May 2020 00:07:50 +0000 (19:07 -0500)
committersev <git@sev.monster>
Fri, 5 Apr 2024 21:27:39 +0000 (16:27 -0500)
synthing still used hardcoded BSD path, swith to dynamic searches.
always use `head -1` with which due to non-portability.
use $HOME instead of ~ to avoid non-portability.

bin/dmenu
bin/syncthing
bin/update-tridactyl-native.sh

index 95039d461722abae6eb3c338869ac352a64f871c..0784cdf953f854813f17b3e88f52e38a58bf5a06 100755 (executable)
--- a/bin/dmenu
+++ b/bin/dmenu
@@ -1,2 +1,2 @@
 #!/bin/sh
-exec `which -a dmenu | grep -iv ~ | head -1` -b -f -fn 'monospace-10' -nb \#110800 -nf \#93a1a1 -sb \#aa5500 -sf \#eee8d5 "$@"
+exec $(which -a dmenu | grep -v "$HOME" | head -1) -b -f -fn 'monospace-10' -nb \#110800 -nf \#93a1a1 -sb \#aa5500 -sf \#eee8d5 "$@"
index 10615e1dcfb5a446d7861ef81a4a3c64bb71c2c4..dbebcfa98c84be1cb61c27c7f0de10c0f2b7b2c9 100755 (executable)
@@ -1,3 +1,3 @@
 #!/bin/sh
 umask 007
-/usr/local/bin/syncthing -logfile="$HOME/var/log/syncthing.log"
+$(which -a syncthing | grep -v "$HOME" | head -1) -logfile="$HOME/var/log/syncthing.log"
index 86bc78b10c45f329bfffbb819530b05b80eab40b..5b03883ecce273e2797d8b5fb69da763dad5f400 100755 (executable)
@@ -17,7 +17,7 @@ echoerr() {
 trap "echoerr 'Failed to install!'" ERR >/dev/null 2>&1 #can't trap ERR in sh
 
 # Check requirements for native messenger
-python_path=$(which python3) || python_path=""
+python_path=$(which python3 | head -1) || python_path=""
 if [ ! -x "$python_path" ]; then
     echoerr "Error: Python 3 must exist in PATH."
     echoerr "Please install it and run this script again."
This page took 0.037731 seconds and 4 git commands to generate.