From 1135f26ad047fcb3131329656790f1dce8661e76 Mon Sep 17 00:00:00 2001 From: sev Date: Mon, 11 May 2020 19:07:50 -0500 Subject: [PATCH] head all which, fix dmenu recursion, fix syncthing 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 | 2 +- bin/syncthing | 2 +- bin/update-tridactyl-native.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/dmenu b/bin/dmenu index 95039d4..0784cdf 100755 --- 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 "$@" diff --git a/bin/syncthing b/bin/syncthing index 10615e1..dbebcfa 100755 --- a/bin/syncthing +++ b/bin/syncthing @@ -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" diff --git a/bin/update-tridactyl-native.sh b/bin/update-tridactyl-native.sh index 86bc78b..5b03883 100755 --- a/bin/update-tridactyl-native.sh +++ b/bin/update-tridactyl-native.sh @@ -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." -- 2.47.0