From 05c0bf5b8e70ee1e8c75bda8d440c7b9251e1d9f Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Wed, 13 Feb 2013 16:55:17 +1100 Subject: tools/mxe-activate: really fix gsed with portability variable --- tools/mxe-activate | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/mxe-activate b/tools/mxe-activate index 33ac5ac..009e9c9 100644 --- a/tools/mxe-activate +++ b/tools/mxe-activate @@ -1,7 +1,10 @@ export MXE_DIR=`pwd` export PATH=$MXE_DIR/usr/bin:$PATH alias mxe='make -C $MXE_DIR' -unset `grep '^unexport' Makefile | sed -n 's,unexport,,p' | tr '\n' ' '` + +SED=`gsed --help >/dev/null 2>&1 && echo g`sed + +unset `grep '^unexport' Makefile | $SED -n 's,unexport,,p' | tr '\n' ' '` _mxe() { @@ -10,12 +13,12 @@ _mxe() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" - pkgs=$( for x in `ls -l $MXE_DIR/src/*.mk | gsed -n 's,.*src/\(.*\)\.mk,\1,p'`; do echo ${x} ; done ) + pkgs=$( for x in `ls -l $MXE_DIR/src/*.mk | $SED -n 's,.*src/\(.*\)\.mk,\1,p'`; do echo ${x} ; done ) tgts="i686-pc-mingw32 x86_64-w64-mingw32 i686-w64-mingw32" case "${cur}" in build-only-*_*) - local base=`echo ${cur} | gsed -n 's,\(.*_\).*,\1,p'` + local base=`echo ${cur} | $SED -n 's,\(.*_\).*,\1,p'` local _tgts=$( for x in ${tgts}; do echo $base${x} ; done ) COMPREPLY=( $(compgen -W "${_tgts}" -- ${cur}) ) return 0 -- cgit v0.12