aboutsummaryrefslogtreecommitdiff
path: root/scripts/portability.sh
diff options
context:
space:
mode:
authorEric Molitor <eric@improbable.io>2019-06-29 07:52:00 -0500
committerRob Landley <rob@landley.net>2019-06-29 12:31:22 -0500
commit78991600dde43868bb3e362a014dd81dc8784b5f (patch)
tree7ce2cb6fb7b182cfd551dd9155214251ae859a25 /scripts/portability.sh
parent5363b092986416b4ec99716bb2b309856ff22526 (diff)
downloadtoybox-78991600dde43868bb3e362a014dd81dc8784b5f.tar.gz
Bash Compatibility Patch
I know that you are working on toysh which I'm looking forward to. In the meantime below is a patch to improve compatibility with older/odd versions of bash. This fixed a minor build issue I was having on MacOS (which was using zsh in emulated bash mode) as well as an oddball embedded SDK using a non-gnu version of bash. I believe these changes are minimal and should be safe to apply, if not I wanted to at least get them on the mailing list in case others ran into these issues.
Diffstat (limited to 'scripts/portability.sh')
-rw-r--r--scripts/portability.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/portability.sh b/scripts/portability.sh
index abeb31f2..618022c7 100644
--- a/scripts/portability.sh
+++ b/scripts/portability.sh
@@ -10,5 +10,5 @@ fi
if [ -z "$SED" ]
then
- [ ! -z "$(which gsed 2>/dev/null)" ] && SED=gsed || SED=sed
+ [ ! -z "$(command -v gsed 2>/dev/null)" ] && SED=gsed || SED=sed
fi