X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=filesystem%2Fusr%2Flocal%2Fbin%2Fabrowser;fp=filesystem%2Fusr%2Flocal%2Fbin%2Fabrowser;h=96c969a4c149ca95aadd09383fa56df94e523534;hb=eef2ed83fa84b3ac19533dfe0239cef4c2223143;hp=b67ec8164a21619b6be2cca6fc74efea52f1333e;hpb=55b37c2dbe292fa1023c0c5376c2104fbe568011;p=distro-setup diff --git a/filesystem/usr/local/bin/abrowser b/filesystem/usr/local/bin/abrowser index b67ec81..96c969a 100755 --- a/filesystem/usr/local/bin/abrowser +++ b/filesystem/usr/local/bin/abrowser @@ -20,6 +20,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# note this is duplicated in i3-abrowser if ! test "$BASH_VERSION"; then echo "error: shell is not bash" >&2; exit 1; fi shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4 @@ -27,13 +28,6 @@ set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" exit status: $?, PIPESTATUS: ${PIPESTATUS[*]}" >&2' ERR -# https://stackoverflow.com/a/2108540 -tmp=:$PATH: -del=/usr/local/bin -tmp=${tmp//:$del:/:} -tmp=${tmp%:} -tmp=${tmp#:} -PATH=$tmp # -allow-downgrade good enough? #rm -f {/p/c/firefox-main-profile,/p/c/firefox-main-profile,/p/c/firefox-vpn2-profile,/mnt/z/firefox-vpn-profile}/compatibility.ini @@ -45,6 +39,14 @@ PATH=$tmp +# remove local/bin from path +# https://stackoverflow.com/a/2108540 +tmp=:$PATH: +del=/usr/local/bin +tmp=${tmp//:$del:/:} +tmp=${tmp%:} +tmp=${tmp#:} +PATH=$tmp # prefer abrowser if type -P abrowser &>/dev/null; then b=abrowser