summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2013-02-13 05:55:17 (GMT)
committerTony Theodore <tonyt@logyst.com>2013-02-13 05:55:17 (GMT)
commit05c0bf5b8e70ee1e8c75bda8d440c7b9251e1d9f (patch)
tree861bee3870a3bb4f7f174cbac83859d00c7b0605
parenta65c60af57100f4ad09655c3f40fd4a9816781ba (diff)
downloadmxe-05c0bf5b8e70ee1e8c75bda8d440c7b9251e1d9f.zip
mxe-05c0bf5b8e70ee1e8c75bda8d440c7b9251e1d9f.tar.gz
mxe-05c0bf5b8e70ee1e8c75bda8d440c7b9251e1d9f.tar.bz2
tools/mxe-activate: really fix gsed with portability variable
-rw-r--r--tools/mxe-activate9
1 files 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