fixes
[distro-setup] / filesystem / usr / local / bin / abrowser
index b67ec8164a21619b6be2cca6fc74efea52f1333e..96c969a4c149ca95aadd09383fa56df94e523534 100755 (executable)
@@ -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