From: sev Date: Tue, 12 May 2020 00:07:50 +0000 (-0500) Subject: head all which, fix dmenu recursion, fix syncthing X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/commitdiff_plain/1135f26ad047fcb3131329656790f1dce8661e76?hp=52c8e29162113d47f1130118c937dcc0516b9483 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. --- 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."